Fix speed GUI not being greyed out on zero speed
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Thu, 11 Nov 2010 21:34:23 +0000 (21:34 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Thu, 11 Nov 2010 21:34:23 +0000 (21:34 +0000)
git-svn-id: https://s.snth.net/svn/neverball/trunk@3359 78b8d119-cf0a-0410-b17c-f493084dd1d7

ball/hud.c

index 7a3fbfd..2cc790b 100644 (file)
@@ -293,12 +293,15 @@ void hud_speed_pulse(int speed)
     {
         const GLfloat *c = gui_gry;
 
-        if      (i > SPEED_NORMAL && i <= speed)
-            c = gui_grn;
-        else if (i < SPEED_NORMAL && i >= speed)
-            c = gui_red;
-        else if (i == SPEED_NORMAL)
-            c = gui_wht;
+        if (speed != SPEED_NONE)
+        {
+            if      (i > SPEED_NORMAL && i <= speed)
+                c = gui_grn;
+            else if (i < SPEED_NORMAL && i >= speed)
+                c = gui_red;
+            else if (i == SPEED_NORMAL)
+                c = gui_wht;
+        }
 
         gui_set_color(speed_ids[i], c, c);