From fe7dca427b30efc1ebd38c0d398d1f212540d1bc Mon Sep 17 00:00:00 2001 From: z411 Date: Sat, 23 Apr 2022 17:19:13 -0400 Subject: [PATCH] Fix timer timeout and lead announcing --- qcsrc/client/hud/panel/timer.qc | 8 +++++++- qcsrc/server/world.qc | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/hud/panel/timer.qc b/qcsrc/client/hud/panel/timer.qc index 193a3ca90..c0a3ece24 100644 --- a/qcsrc/client/hud/panel/timer.qc +++ b/qcsrc/client/hud/panel/timer.qc @@ -145,7 +145,13 @@ void HUD_Timer() // Use real or frozen time and get the time limit round_endtime = STAT(ROUNDENDTIME); round_timelimit = STAT(ROUND_TIMELIMIT); - round_curtime = (round_endtime ? round_endtime : time); + + if(round_endtime) + round_curtime = round_endtime; + else if(timeout_last) + round_curtime = timeout_last; + else + round_curtime = time; // Calculate time left round_timeleft = HUD_Timer_TimeLeft(round_curtime, STAT(ROUNDSTARTTIME), round_timelimit); diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index 101fc633a..f0e98b657 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -1523,6 +1523,9 @@ void ClearWinners() void AnnounceNewLeader() { + // Don't announce if in warmup or just started + if(warmup_stage || time - game_starttime < 1) return; + if(teamplay) { if (WinningConditionHelper_equality) Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_TEAM_LEADS_TIED); -- 2.39.2