P_KillPlayer: fix "special out" -- player shrinks to a speck from dying in Sealed Stars

Regression due to refactoring. I added some comments to
put emphasis on the intended behavior.
This commit is contained in:
James R. 2023-09-08 03:06:02 -07:00
parent eff847b216
commit eca8804c0e

View file

@ -2068,20 +2068,30 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source,
return false;
}
if (player->exiting == false && specialstageinfo.valid == true)
{
HU_DoTitlecardCEcho(player, "FALL OUT!", false);
// This must be done before the condition to set
// destscale = 1, so any special stage death
// shrinks the player to a speck.
P_DoPlayerExit(player, PF_NOCONTEST);
}
if (player->exiting)
{
// If the player already finished the race, and
// they fall into a death pit afterward, their
// body shrinks into nothingness.
player->mo->destscale = 1;
player->mo->flags |= MF_NOCLIPTHING;
return false;
}
if (specialstageinfo.valid == true)
{
HU_DoTitlecardCEcho(player, "FALL OUT!", false);
P_DoPlayerExit(player, PF_NOCONTEST);
}
else if (modeattacking & ATTACKING_SPB)
if (modeattacking & ATTACKING_SPB)
{
// Death in SPB Attack is an instant loss.
P_DoPlayerExit(player, PF_NOCONTEST);
}
}