Prevent a special stage win by sneaking ahead of the UFO to the goal line

This commit is contained in:
toaster 2022-12-31 19:02:22 +00:00
parent 5b027ff2fe
commit 6b18f869b9

View file

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