]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make timer stuck in infinite warmup z411/timer_warmup
authorz411 <z411@omaera.org>
Fri, 25 Mar 2022 04:22:44 +0000 (01:22 -0300)
committerz411 <z411@omaera.org>
Fri, 25 Mar 2022 04:22:44 +0000 (01:22 -0300)
qcsrc/client/hud/panel/timer.qc

index 68e7312c7a5ba881ee1f45a000e91f64219ea7fb..85527d5d665fc5c257f65a022a87ee577bcf967d 100644 (file)
@@ -91,7 +91,12 @@ void HUD_Timer()
                timer_color = HUD_Timer_Color(timeleft);
 
        // Timer text
-       if (autocvar_hud_panel_timer_increment || timelimit <= 0)
+       if (timelimit == -1) // Infinite warmup
+               if (autocvar_hud_panel_timer_increment)
+                       timer = seconds_tostring(0);
+               else
+                       timer = seconds_tostring(STAT(TIMELIMIT) * 60);
+       else if (autocvar_hud_panel_timer_increment || timelimit == 0)
                timer = seconds_tostring(HUD_Timer_TimeElapsed(curtime, STAT(GAMESTARTTIME)));
        else
                timer = seconds_tostring(timeleft);