mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- 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:
parent
5d388f8e63
commit
3e13e772ef
4 changed files with 10 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = §ors[s];
|
||||
sec->damageamount = damage;
|
||||
sec->damagemod = 0;//MOD_UNKNOWN;
|
||||
sec->damagetype = NAME_None;
|
||||
if (sec->damageamount < 20)
|
||||
{
|
||||
sec->leakydamage = 0;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue