From 6b18f869b9e90a1a401453e0325fe2e657d521d3 Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 31 Dec 2022 19:02:22 +0000 Subject: [PATCH] Prevent a special stage win by sneaking ahead of the UFO to the goal line --- src/p_spec.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/p_spec.c b/src/p_spec.c index b85746db6..208e6c04f 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -43,6 +43,7 @@ // SRB2kart #include "k_kart.h" +#include "k_specialstage.h" #include "console.h" // CON_LogMessage #include "k_respawn.h" #include "k_terrain.h" @@ -1925,6 +1926,14 @@ static void K_HandleLapIncrement(player_t *player) // finished race exit setup if (player->laps > numlaps) { + if (specialstageinfo.valid == true) + { + // Don't permit a win just by sneaking ahead of the UFO/emerald. + if (!(specialstageinfo.ufo == NULL || P_MobjWasRemoved(specialstageinfo.ufo))) + { + player->pflags |= PF_NOCONTEST; + } + } P_DoPlayerExit(player); P_SetupSignExit(player); }