]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'z411/timer_bound' into 'master'
authorterencehill <piuntn@gmail.com>
Sun, 2 Jan 2022 18:43:48 +0000 (18:43 +0000)
committerterencehill <piuntn@gmail.com>
Sun, 2 Jan 2022 18:43:48 +0000 (18:43 +0000)
Added upper bound for decreasing timer

See merge request xonotic/xonotic-data.pk3dir!960

qcsrc/client/hud/panel/timer.qc

index f1c4dcfe807b89e456ba230abc91e59bc7b276bf..035d21b60d9c889e00209f19076631aafc5251e5 100644 (file)
@@ -41,7 +41,7 @@ void HUD_Timer()
 
        timelimit = STAT(TIMELIMIT);
 
-       timeleft = max(0, timelimit * 60 + STAT(GAMESTARTTIME) - time);
+       timeleft = bound(0, timelimit * 60 + STAT(GAMESTARTTIME) - time, timelimit * 60);
        timeleft = ceil(timeleft);
 
        minutesLeft = floor(timeleft / 60);