From: z411 Date: Thu, 18 Nov 2021 17:07:08 +0000 (-0300) Subject: Set an upper bound for the timer (game's timelimit) X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fz411%2Flimit_timer;p=xonotic%2Fxonotic-data.pk3dir.git Set an upper bound for the timer (game's timelimit) --- diff --git a/qcsrc/client/hud/panel/timer.qc b/qcsrc/client/hud/panel/timer.qc index 0cdfefa78..26490d403 100644 --- a/qcsrc/client/hud/panel/timer.qc +++ b/qcsrc/client/hud/panel/timer.qc @@ -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);