From 844dcc22ae6501debf2a5afa9dd7468056c40810 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 14 Feb 2020 00:37:15 +0100 Subject: [PATCH] - SW: Don't allow level change via cheat when dead. --- source/sw/src/cheats.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/sw/src/cheats.cpp b/source/sw/src/cheats.cpp index b821a460f..39aa46aab 100644 --- a/source/sw/src/cheats.cpp +++ b/source/sw/src/cheats.cpp @@ -236,6 +236,7 @@ void WarpCheat(PLAYERp pp, const char *cheat_string) //DSPRINTF(ds,"ep %d, lev %d",episode_num, level_num); //MONO_PRINT(ds); + if (!pp) return; if (!SW_SHAREWARE) { if (level_num > 28 || level_num < 1) @@ -246,6 +247,9 @@ void WarpCheat(PLAYERp pp, const char *cheat_string) if (level_num > 4 || level_num < 1) return; } + if (TEST(pp->Flags, PF_DEAD)) + return; + Level = level_num; ExitLevel = TRUE;