]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/timer.qc
Merge branch 'master' into z411/annce_queue
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / timer.qc
index 68e7312c7a5ba881ee1f45a000e91f64219ea7fb..00a231b7cf44607d70fd56e338784f2fe3fdbdb5 100644 (file)
@@ -1,4 +1,5 @@
 #include "timer.qh"
+#include "scoreboard.qh"
 
 #include <client/draw.qh>
 #include <client/view.qh>
@@ -73,15 +74,9 @@ void HUD_Timer()
        // Use real or frozen time and get the time limit
        curtime = (intermission_time ? intermission_time : time);
        if(warmup_stage)
-       {
                timelimit = STAT(WARMUP_TIMELIMIT);
-               if(timelimit == 0)
-                       timelimit = STAT(TIMELIMIT) * 60;
-       }
        else
-       {
                timelimit = STAT(TIMELIMIT) * 60;
-       }
 
        // Calculate time left
        timeleft = HUD_Timer_TimeLeft(curtime, STAT(GAMESTARTTIME), timelimit);
@@ -129,7 +124,12 @@ void HUD_Timer()
        int overtimes = STAT(OVERTIMES);
 
        if(warmup_stage || autocvar__hud_configure)
-               subtext = _("Warmup");
+       {
+               if (STAT(WARMUP_TIMELIMIT) > 0)
+                       subtext = _("Warmup");
+               else
+                       subtext = srv_minplayers ? _("Warmup: too few players") : _("Warmup: no time limit");
+       }
        else if(STAT(TIMEOUT_STATUS) == 2)
                subtext = _("Timeout");
        else if (overtimes == -1)