Merge branch 'special-out-fix' into 'master'

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

Closes #663

See merge request KartKrew/Kart!1466
This commit is contained in:
Oni 2023-09-08 11:37:27 +00:00
commit ba42707d3e

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);
}
}