- SW: For single player games, call PlayerDeathReset() from TerminateLevel() and not DoPlayerDeathCheckKeys().

* This fixes issues where player stats like health, etc are shown onscreen as reset before the entire view reloads.
This commit is contained in:
Mitchell Richters 2022-12-11 14:41:27 +11:00 committed by Christoph Oelckers
parent b8a8164b24
commit 28b97486cd
2 changed files with 4 additions and 1 deletions

View file

@ -580,6 +580,8 @@ void TerminateLevel(void)
{
PLAYER* pp = &Player[pnum];
PlayerDeathReset(pp);
// Free panel sprites for players
pClearSpriteList(pp);

View file

@ -6026,7 +6026,6 @@ void DoPlayerDeathCheckKeys(PLAYER* pp)
plActor->spr.scale = DVector2(PLAYER_NINJA_XREPEAT, PLAYER_NINJA_YREPEAT);
plActor->user.ID = NINJA_RUN_R0;
PlayerDeathReset(pp);
if (pp == Player + screenpeek)
{
@ -6040,6 +6039,8 @@ void DoPlayerDeathCheckKeys(PLAYER* pp)
if (numplayers > 1)
{
PlayerDeathReset(pp);
// need to call this routine BEFORE resetting DEATH flag
DoPlayerBeginRun(pp);
}