- amend previous commit: do the same for healing sectors, as well

This commit is contained in:
Rachael Alexanderson 2020-06-23 13:37:56 -04:00
parent 90895d154b
commit f47055bca6

View file

@ -456,7 +456,7 @@ void P_PlayerInSpecialSector (player_t *player, sector_t * sector)
{
if (!(player->cheats & (CF_GODMODE | CF_GODMODE2)))
{
if (sector->damageinterval == 0 && sector->damageamount > 0) // level designer seems to be a bit of a sadist, we're going to just instantly kill the player if damageamount is above 0.
if (sector->damageinterval == 0) // level designer seems to be a bit of a sadist, we're going to just instantly kill the player if damageamount is above 0.
P_DamageMobj(player->mo, NULL, NULL, TELEFRAG_DAMAGE, sector->damagetype);
else
P_DamageMobj(player->mo, NULL, NULL, sector->damageamount, sector->damagetype);
@ -474,7 +474,11 @@ void P_PlayerInSpecialSector (player_t *player, sector_t * sector)
}
else if (sector->damageamount < 0)
{
if (Level->time % sector->damageinterval == 0)
if (sector->damageinterval == 0)
{
P_GiveBody(player->mo, 100, 100); // just fully heal the player
}
else if (Level->time % sector->damageinterval == 0)
{
P_GiveBody(player->mo, -sector->damageamount, 100);
}