From: z411 Date: Sun, 2 Jan 2022 18:43:48 +0000 (+0000) Subject: Added upper bound for decreasing timer X-Git-Tag: xonotic-v0.8.5~247^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=34ba1f0f3bdb2294f71c59b0d20120ed4d8d0ae4;p=xonotic%2Fxonotic-data.pk3dir.git Added upper bound for decreasing timer --- diff --git a/qcsrc/client/hud/panel/timer.qc b/qcsrc/client/hud/panel/timer.qc index 0cdfefa78..75afc363f 100644 --- a/qcsrc/client/hud/panel/timer.qc +++ b/qcsrc/client/hud/panel/timer.qc @@ -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);