Starved = false;
FuelToBurn = CalcFuelNeed();
+ if (FuelToBurn == 0.0) return;
while (FuelToBurn > 0.0) {
// Count how many fuel tanks with the current priority level have fuel.
// If none, then try next lower priority. Build the feed list.
- while ((TanksWithFuel == 0.0) && (CurrentPriority <= Propulsion->GetNumTanks())) {
+ while ((TanksWithFuel == 0) && (CurrentPriority <= Propulsion->GetNumTanks())) {
for (i=0; i<Propulsion->GetNumTanks(); i++) {
if (SourceTanks[i] != 0) {
Tank = Propulsion->GetTank(i);
Tank->Drain(FuelNeeded);
FuelToBurn -= FuelNeeded;
}
-
- // check if we were not able to burn all the fuel we needed to at this priority level
- if (FuelToBurn > 0.0) {
- CurrentPriority++;
- TanksWithFuel = 0;
- FeedList.clear();
- }
} // while
}