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; |