From 01aaef1528486e49ba2367079698e96a24b54fd5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 22 Jan 2016 12:16:17 +0100 Subject: [PATCH] - fixed: The P_DamageMobj call for damaging sectors should be skipped completely if godmode is on, so that instant damage sectors don't kill an invulnerable player. --- src/p_spec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_spec.cpp b/src/p_spec.cpp index 523295642..2cb322278 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -463,7 +463,7 @@ void P_PlayerInSpecialSector (player_t *player, sector_t * sector) } else if (level.time % sector->damageinterval == 0) { - P_DamageMobj(player->mo, NULL, NULL, sector->damageamount, sector->damagetype); + if (!(player->cheats & (CF_GODMODE|CF_GODMODE2))) P_DamageMobj(player->mo, NULL, NULL, sector->damageamount, sector->damagetype); if ((sector->Flags & SECF_ENDLEVEL) && player->health <= 10 && (!deathmatch || !(dmflags & DF_NO_EXIT))) { G_ExitLevel(0, false);