mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
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:
commit
22b3a29d12
1 changed files with 16 additions and 5 deletions
21
src/p_user.c
21
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue