From 5315cd42c0de8abab81884ebfe6eb6681b537204 Mon Sep 17 00:00:00 2001 From: tomas7770 <77364520+tomas7770@users.noreply.github.com> Date: Sat, 28 Oct 2023 14:06:29 +0100 Subject: [PATCH] IDDQD: fix reviving if god mode was already enabled (#1242) --- src/m_cheat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/m_cheat.c b/src/m_cheat.c index 81fba22d..2b575fd9 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -419,6 +419,11 @@ static void cheat_god() P_SpawnMobj(plyr->mo->x+20*finecosine[an], plyr->mo->y+20*finesine[an], plyr->mo->z, MT_TFOG); S_StartSound(plyr->mo, sfx_slop); P_MapEnd(); + + // Fix reviving as "zombie" if god mode was already enabled + if (plyr->mo) + plyr->mo->health = god_health; // Ty 03/09/98 - deh + plyr->health = god_health; } plyr->cheats ^= CF_GODMODE;