]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make the timer turn red at 1:00, not 0:59 seconds remaining
authorterencehill <piuntn@gmail.com>
Tue, 8 Mar 2022 20:40:07 +0000 (21:40 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 8 Mar 2022 20:40:07 +0000 (21:40 +0100)
qcsrc/client/hud/panel/timer.qc

index 034ae3802307b043d6f37c6bdab35394c4529ce7..cdf635f2273063bce61e865a5add4bec653ef33d 100644 (file)
@@ -12,12 +12,12 @@ void HUD_Timer_Export(int fh)
 
 vector HUD_Timer_Color(float timeleft)
 {
-       if(timeleft >= 300)
-               return '1 1 1'; //white
-       else if(timeleft >= 60)
-               return '1 1 0'; //yellow
+       if(timeleft <= 60)
+               return '1 0 0'; // red
+       else if(timeleft <= 300)
+               return '1 1 0'; // yellow
        else
-               return '1 0 0'; //red
+               return '1 1 1'; // white
 }
 
 float HUD_Timer_TimeElapsed(float curtime, float starttime)