- Fixed: Switching maps using the ResetHealth flag while dead would prevent proper

reinitialization of the player on the new map.

SVN r3478 (trunk)
This commit is contained in:
Randy Heit 2012-03-23 23:24:30 +00:00
parent ac0c1eb64b
commit 0a03676796

View file

@ -1264,8 +1264,8 @@ void G_PlayerFinishLevel (int player, EFinishLevelType mode, int flags)
P_UndoPlayerMorph (p, p, 0, true); P_UndoPlayerMorph (p, p, 0, true);
} }
// Resets player health to default // Resets player health to default if not dead.
if (flags & CHANGELEVEL_RESETHEALTH) if ((flags & CHANGELEVEL_RESETHEALTH) && p->playerstate != PST_DEAD)
{ {
p->health = p->mo->health = p->mo->SpawnHealth(); p->health = p->mo->health = p->mo->SpawnHealth();
} }