- change recent /0 fix to conform to UDMF specs

# Conflicts:
#	src/playsim/p_spec.cpp
This commit is contained in:
Rachael Alexanderson 2020-06-25 09:30:52 -04:00 committed by drfrag
parent ee94d3b627
commit de2d564c98
2 changed files with 4 additions and 2 deletions

View file

@ -457,8 +457,8 @@ void P_PlayerInSpecialSector (player_t *player, sector_t * sector)
// Has hit ground.
AActor *ironfeet;
if (sector->damageinterval == 0)
sector->damageinterval = 32;
if (sector->damageinterval <= 0)
sector->damageinterval = 32; // repair invalid damageinterval values
// [RH] Apply any customizable damage
if (sector->damageamount > 0)

View file

@ -1648,6 +1648,8 @@ class PlayerPawn : Actor
if (player.hazardcount)
{
player.hazardcount--;
if (player.hazardinterval <= 0)
player.hazardinterval = 32; // repair invalid hazardinterval
if (!(Level.maptime % player.hazardinterval) && player.hazardcount > 16*TICRATE)
player.mo.DamageMobj (NULL, NULL, 5, player.hazardtype);
}