]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Lock timer in infinite warmup
authorz411 <z411@omaera.org>
Sat, 9 Apr 2022 01:01:47 +0000 (21:01 -0400)
committerz411 <z411@omaera.org>
Sat, 9 Apr 2022 01:01:47 +0000 (21:01 -0400)
qcsrc/client/hud/panel/timer.qc

index 51095ae1a8ed4673c4c267fe3e141d8109f2a497..ccbfabc209838ee3ac62d814b3d20903706184cb 100644 (file)
@@ -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)