]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Set an upper bound for the timer (game's timelimit) z411/limit_timer
authorz411 <z411@omaera.org>
Thu, 18 Nov 2021 17:07:08 +0000 (14:07 -0300)
committerz411 <z411@omaera.org>
Thu, 18 Nov 2021 17:07:08 +0000 (14:07 -0300)
qcsrc/client/hud/panel/timer.qc

index 0cdfefa7899af591aaf4f3ef3c567152d02e41ac..26490d4039386b47ccd7e4b3955adc852d8c6274 100644 (file)
@@ -42,6 +42,7 @@ void HUD_Timer()
        timelimit = STAT(TIMELIMIT);
 
        timeleft = max(0, timelimit * 60 + STAT(GAMESTARTTIME) - time);
+       timeleft = min(timeleft, timelimit * 60);
        timeleft = ceil(timeleft);
 
        minutesLeft = floor(timeleft / 60);