blackbox/main.c

changeset 123
ec623e5fcbca
parent 116
c2fc650cc48f
child 124
0b12a8bf23b2
equal deleted inserted replaced
122:8344d8d38c4f 123:ec623e5fcbca
421 } else slot[controller].fuel = 0; 421 } else slot[controller].fuel = 0;
422 } 422 }
423 } else if (slot[controller].canrefuel) { 423 } else if (slot[controller].canrefuel) {
424 // increase fuel by 5%/sec, this equals by adding 50 to the counter 424 // increase fuel by 5%/sec, this equals by adding 50 to the counter
425 slot[controller].fuel += 50; 425 slot[controller].fuel += 50;
426 if (slot[controller].fuel > FUEL_FULL) slot[controller].fuel = FUEL_FULL; 426 if (slot[controller].fuel > FUEL_FULL) {
427 slot[controller].fuel = FUEL_FULL;
428 slot[controller].canrefuel = 0;
429 }
427 } 430 }
428 return 1; 431 return 1;
429 } 432 }
430 return 1; 433 return 1;
431 } else return 0; 434 } else return 0;

mercurial