- after realizing that changing the sector's MOD variable to an FNameNoInit doesn't do anything bad, I just went ahead and got rid of the last place in the engine that still used this data type for internal storage.

This commit is contained in:
Christoph Oelckers 2016-01-05 16:10:04 +01:00
parent 5d388f8e63
commit 3e13e772ef
4 changed files with 10 additions and 7 deletions

View File

@ -2276,7 +2276,7 @@ FUNC(LS_Sector_SetDamage)
}
}
sectors[secnum].damageamount = (short)arg1;
sectors[secnum].damagemod = (short)arg2;
sectors[secnum].damagetype = MODtoDamageType(arg2);
sectors[secnum].damageinterval = (short)arg3;
sectors[secnum].leakydamage = (short)arg4;
}

View File

@ -369,15 +369,18 @@ void P_SerializeWorld (FArchive &arc)
<< sec->heightsec
<< sec->bottommap << sec->midmap << sec->topmap
<< sec->gravity
<< sec->damageamount
<< sec->damagemod;
<< sec->damageamount;
if (SaveVersion >= 4528)
{
arc << sec->damageinterval
<< sec->leakydamage;
<< sec->leakydamage
<< sec->damagetype;
}
else
{
short damagemod;
arc << damagemod;
sec->damagetype = MODtoDamageType(damagemod);
if (sec->damageamount < 20)
{
sec->leakydamage = 0;

View File

@ -570,7 +570,7 @@ void P_PlayerInSpecialSector (player_t *player, sector_t * sector)
{
if (level.time % sector->damageinterval == 0 && (ironfeet == NULL || pr_playerinspecialsector() < sector->leakydamage))
{
P_DamageMobj (player->mo, NULL, NULL, sector->damageamount, MODtoDamageType (sector->damagemod));
P_DamageMobj (player->mo, NULL, NULL, sector->damageamount, sector->damagetype);
}
}
@ -1439,7 +1439,7 @@ void P_SpawnSpecials (void)
{
sector_t *sec = &sectors[s];
sec->damageamount = damage;
sec->damagemod = 0;//MOD_UNKNOWN;
sec->damagetype = NAME_None;
if (sec->damageamount < 20)
{
sec->leakydamage = 0;

View File

@ -710,8 +710,8 @@ struct sector_t
struct msecnode_t *touching_thinglist; // phares 3/14/98
float gravity; // [RH] Sector gravity (1.0 is normal)
FNameNoInit damagetype; // [RH] Means-of-death for applied damage
short damageamount; // [RH] Damage to do while standing on floor
short damagemod; // [RH] Means-of-death for applied damage
short damageinterval; // Interval for damage application
short leakydamage; // chance of leaking through radiation suit