]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Added upper bound for decreasing timer
authorz411 <electrik.persona@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)
qcsrc/client/hud/panel/timer.qc

index 0cdfefa7899af591aaf4f3ef3c567152d02e41ac..75afc363f0b35fbe460168ca699da6b2de405375 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);