From f47055bca6e815d662198564447afddcb0297ad9 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 23 Jun 2020 13:37:56 -0400 Subject: [PATCH] - amend previous commit: do the same for healing sectors, as well --- src/playsim/p_spec.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/playsim/p_spec.cpp b/src/playsim/p_spec.cpp index c820baf8f..d3b8f67cf 100644 --- a/src/playsim/p_spec.cpp +++ b/src/playsim/p_spec.cpp @@ -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); }