diff --git a/src/p_user.c b/src/p_user.c index f45a969c..a168f551 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1778,11 +1778,22 @@ void P_DoPlayerExit(player_t *player) if (G_RaceGametype()) // If in Race Mode, allow { - // SRB2kart 120217 - if (!countdown && !(netgame || multiplayer)) - countdown = 60*TICRATE + 1; // 60 seconds to finish, get going! - else if (!countdown) - countdown = cv_countdowntime.value*TICRATE + 1; // Use cv_countdowntime + if (!countdown) + { + UINT8 i; + + for (i = 0; i < MAXPLAYERS; i++) + { + if (!playeringame[i] || players[i].spectator) + continue; + if (players[i].exiting || K_IsPlayerLosing(players[i])) // Only start countdown when all winners are declared + continue; + break; + } + + if (i == MAXPLAYERS) + countdown = ((!(netgame || multiplayer) ? cv_countdowntime.defaultvalue : cv_countdowntime.value)*TICRATE) + 1; // 30 seconds to finish, get going! + } if (cv_kartvoices.value) {