- SW: Properly guard the call to PlayerDeathReset() in TerminateLevel().

* Stems from an oversight in 28b97486cd.
* Fixes #796.
This commit is contained in:
Mitchell Richters 2022-12-17 06:32:03 +11:00
parent 8bbf7f4e00
commit cf5ba0886a
2 changed files with 2 additions and 8 deletions

View file

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

View file

@ -6016,13 +6016,6 @@ void DoPlayerDeathCheckKeys(PLAYER* pp)
DoPlayerZrange(pp); DoPlayerZrange(pp);
pp->sop_control = nullptr;
pp->sop_remote = nullptr;
pp->sop_riding = nullptr;
pp->sop = nullptr;
pp->Flags &= ~(PF_WEAPON_DOWN|PF_WEAPON_RETRACT);
pp->Flags &= ~(PF_DEAD);
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER); plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
plActor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); plActor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
plActor->spr.scale = DVector2(PLAYER_NINJA_XREPEAT, PLAYER_NINJA_YREPEAT); plActor->spr.scale = DVector2(PLAYER_NINJA_XREPEAT, PLAYER_NINJA_YREPEAT);