blackbox/main.c

changeset 123
ec623e5fcbca
parent 116
c2fc650cc48f
child 124
0b12a8bf23b2
--- a/blackbox/main.c	Sat Dec 15 17:12:40 2012 +0100
+++ b/blackbox/main.c	Sat Dec 15 22:55:30 2012 +0100
@@ -423,7 +423,10 @@
             } else if (slot[controller].canrefuel) {
                 // increase fuel by 5%/sec, this equals by adding 50 to the counter
                 slot[controller].fuel += 50;
-                if (slot[controller].fuel > FUEL_FULL) slot[controller].fuel = FUEL_FULL;
+                if (slot[controller].fuel > FUEL_FULL) {
+                    slot[controller].fuel = FUEL_FULL;
+                    slot[controller].canrefuel = 0;
+                }
             }
             return 1;
         }

mercurial