From 4dc1797345caf8bccd4ff52f93a701ad49caa2dd Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 12 Nov 2020 18:21:42 +1100 Subject: [PATCH] - Duke: Reset `p->dead_flag` when enabling the god cheat as per original behaviour. * Fixes #172. --- source/games/duke/src/cheats.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/games/duke/src/cheats.cpp b/source/games/duke/src/cheats.cpp index c6ca45431..4ebc0c75d 100644 --- a/source/games/duke/src/cheats.cpp +++ b/source/games/duke/src/cheats.cpp @@ -63,8 +63,10 @@ static const char *cheatGod(int myconnectindex, int state) if (state == -1) state = !ud.god; ud.god = state; - auto act = ps[myconnectindex].GetActor(); + auto* p = &ps[myconnectindex]; + auto act = p->GetActor(); + p->dead_flag = 0; act->s.extra = max_player_health; act->extra = 0; if (ud.god)