From eca8804c0ebf7c25f7f10a73c4c9131e2d6867d9 Mon Sep 17 00:00:00 2001 From: "James R." Date: Fri, 8 Sep 2023 03:06:02 -0700 Subject: [PATCH] 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. --- src/p_inter.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index cdf4a05d2..5ea667290 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -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); } }