From 798623658e17df50eaf50f724a6af513ffddfc71 Mon Sep 17 00:00:00 2001 From: z411 Date: Fri, 8 Apr 2022 21:01:47 -0400 Subject: [PATCH] Lock timer in infinite warmup --- qcsrc/client/hud/panel/timer.qc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/hud/panel/timer.qc b/qcsrc/client/hud/panel/timer.qc index 51095ae1a..ccbfabc20 100644 --- a/qcsrc/client/hud/panel/timer.qc +++ b/qcsrc/client/hud/panel/timer.qc @@ -116,10 +116,21 @@ void HUD_Timer() } // Timer text - if (autocvar_hud_panel_timer_increment || timelimit <= 0) - timer = seconds_tostring(HUD_Timer_TimeElapsed(curtime, STAT(GAMESTARTTIME))); + if (warmup_stage && timelimit == -1) + { + // Lock timer in infinite warmup + if (autocvar_hud_panel_timer_increment) + timer = seconds_tostring(0); + else + timer = seconds_tostring(STAT(TIMELIMIT) * 60); + } else - timer = seconds_tostring(timeleft); + { + if (autocvar_hud_panel_timer_increment || timelimit <= 0) + timer = seconds_tostring(HUD_Timer_TimeElapsed(curtime, STAT(GAMESTARTTIME))); + else + timer = seconds_tostring(timeleft); + } // Secondary timer for round-based game modes if(STAT(ROUNDSTARTTIME) && autocvar_hud_panel_timer_secondary) -- 2.39.2