Merge branch 'countdown-on-all-win' into 'master'

Finish countdown only starts when all winners are declared

See merge request KartKrew/Kart!99
This commit is contained in:
Sal 2018-11-18 16:09:09 -05:00
commit 22b3a29d12

View file

@ -1778,11 +1778,22 @@ void P_DoPlayerExit(player_t *player)
if (G_RaceGametype()) // If in Race Mode, allow if (G_RaceGametype()) // If in Race Mode, allow
{ {
// SRB2kart 120217 if (!countdown)
if (!countdown && !(netgame || multiplayer)) {
countdown = 60*TICRATE + 1; // 60 seconds to finish, get going! UINT8 i;
else if (!countdown)
countdown = cv_countdowntime.value*TICRATE + 1; // Use cv_countdowntime 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) if (cv_kartvoices.value)
{ {