mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 00:21:43 +00:00
- amend previous commit: do the same for healing sectors, as well
This commit is contained in:
parent
90895d154b
commit
f47055bca6
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue