IDDQD: fix reviving if god mode was already enabled (#1242)

This commit is contained in:
tomas7770 2023-10-28 14:06:29 +01:00 committed by GitHub
parent fb36fb3379
commit 5315cd42c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;