From 0a0367679618662c119c1bdc428f2f27af17c46a Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 23 Mar 2012 23:24:30 +0000 Subject: [PATCH] - Fixed: Switching maps using the ResetHealth flag while dead would prevent proper reinitialization of the player on the new map. SVN r3478 (trunk) --- src/g_game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_game.cpp b/src/g_game.cpp index 915d5eec8f..badfc44b21 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -1264,8 +1264,8 @@ void G_PlayerFinishLevel (int player, EFinishLevelType mode, int flags) P_UndoPlayerMorph (p, p, 0, true); } - // Resets player health to default - if (flags & CHANGELEVEL_RESETHEALTH) + // Resets player health to default if not dead. + if ((flags & CHANGELEVEL_RESETHEALTH) && p->playerstate != PST_DEAD) { p->health = p->mo->health = p->mo->SpawnHealth(); }