From 61de5367d7be85c7920d9dddb283e5baf60993c0 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 13 Feb 2023 18:00:02 +0000 Subject: [PATCH 1/4] P_KillPlayer: In special stages, falling off the stage means immediate no contest and life loss. --- src/p_inter.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/p_inter.c b/src/p_inter.c index b6a864a0d..e8ca672d6 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1901,6 +1901,12 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source, { (void)source; + if (!player->exiting && specialstageinfo.valid == true) + { + player->pflags |= PF_NOCONTEST; + P_DoPlayerExit(player); + } + if (player->exiting) { player->mo->destscale = 1; From 8b14d105066e1d644dcd17d58dbeb3d004cb4a83 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 13 Feb 2023 18:03:56 +0000 Subject: [PATCH 2/4] Special Stages: Distinguish between failures with and without lives. - With lives remaining: No FINISH text, 1 second before restart - With no lives remaining: Yes FINISH text, 2 and a half seconds before return to menu(/emeraldless podium when implemented) --- src/k_kart.c | 5 ++++- src/p_user.c | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 9c9feac0f..13e96b25c 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -7233,7 +7233,10 @@ void K_KartPlayerHUDUpdate(player_t *player) player->karthud[khud_ringspblock] = (leveltime % 14); // reset to normal anim next time } - if (player->exiting) + if (player->exiting + && (specialstageinfo.valid == false + || !(player->pflags & PF_NOCONTEST) + || player->lives <= 0)) { if (player->karthud[khud_finish] <= 2*TICRATE) player->karthud[khud_finish]++; diff --git a/src/p_user.c b/src/p_user.c index 078f6e5ad..8bb77b79a 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1314,7 +1314,14 @@ void P_DoPlayerExit(player_t *player) { if (specialstageinfo.valid == true && losing == true) { - exitcountdown = (5*TICRATE)/2; + if (player->lives > 0) + { + exitcountdown = TICRATE; + } + else + { + exitcountdown = (5*TICRATE)/2; + } } else { From c2b0cca735d12ae741356d5b3c742185bcaac63d Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 13 Feb 2023 18:04:44 +0000 Subject: [PATCH 3/4] K_HandleLapIncrement: Do not spawn Finish Sign if player who crosses finish line is PF_NOCONTESTing. --- src/p_spec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/p_spec.c b/src/p_spec.c index 40501ff62..3637afab1 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1997,8 +1997,11 @@ static void K_HandleLapIncrement(player_t *player) player->pflags |= PF_NOCONTEST; } } + P_DoPlayerExit(player); - P_SetupSignExit(player); + + if (!(player->pflags & PF_NOCONTEST)) + P_SetupSignExit(player); } else { From 98c333e313eb9005f9fbca9e034c5ab577d30a9b Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 13 Feb 2023 18:18:54 +0000 Subject: [PATCH 4/4] Per discussion, always use short, FINISHless exit for special stage failure. --- src/k_kart.c | 3 +-- src/p_user.c | 9 +-------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 13e96b25c..ae340525d 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -7235,8 +7235,7 @@ void K_KartPlayerHUDUpdate(player_t *player) if (player->exiting && (specialstageinfo.valid == false - || !(player->pflags & PF_NOCONTEST) - || player->lives <= 0)) + || !(player->pflags & PF_NOCONTEST))) { if (player->karthud[khud_finish] <= 2*TICRATE) player->karthud[khud_finish]++; diff --git a/src/p_user.c b/src/p_user.c index 8bb77b79a..f70054122 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1314,14 +1314,7 @@ void P_DoPlayerExit(player_t *player) { if (specialstageinfo.valid == true && losing == true) { - if (player->lives > 0) - { - exitcountdown = TICRATE; - } - else - { - exitcountdown = (5*TICRATE)/2; - } + exitcountdown = TICRATE; } else {