From 12ee59bdfae64dbf61f5af31582f2385eb3978e7 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sun, 18 Nov 2018 06:17:42 -0500 Subject: [PATCH 1/2] Finish countdown only starts when all winners are declared Still removing/changing crusty vanilla holdovers, one at a time. :shitsfree: --- src/p_user.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index f45a969c..10c7f647 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) { From 0720264bc27918fd6254b6889ecb3b5c41377995 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 18 Nov 2018 09:10:26 -0500 Subject: [PATCH 2/2] Negate `(netgame || multiplayer)` condition for countdown to use `defaultvalue` instead of `value` per the specifics of the previous implementation --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index 10c7f647..a168f551 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1792,7 +1792,7 @@ void P_DoPlayerExit(player_t *player) } if (i == MAXPLAYERS) - countdown = (((netgame || multiplayer) ? cv_countdowntime.defaultvalue : cv_countdowntime.value)*TICRATE) + 1; // 30 seconds to finish, get going! + countdown = ((!(netgame || multiplayer) ? cv_countdowntime.defaultvalue : cv_countdowntime.value)*TICRATE) + 1; // 30 seconds to finish, get going! } if (cv_kartvoices.value)