mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 11:01:36 +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 (!(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);
|
P_DamageMobj(player->mo, NULL, NULL, TELEFRAG_DAMAGE, sector->damagetype);
|
||||||
else
|
else
|
||||||
P_DamageMobj(player->mo, NULL, NULL, sector->damageamount, sector->damagetype);
|
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)
|
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);
|
P_GiveBody(player->mo, -sector->damageamount, 100);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue