for (unsigned int i=0; i<numTanks; i++) {
Tanks[i]->Calculate( dt * rate );
- }
+ }
if (refuel) DoRefuel( dt * rate );
ThrottleAdded = true;
if (engType == "FG_ROCKET") {
- Engines.push_back(new FGRocket(FDMExec, Cfg_ptr));
+ Engines.push_back(new FGRocket(FDMExec, Cfg_ptr, numEngines));
} else if (engType == "FG_PISTON") {
- Engines.push_back(new FGPiston(FDMExec, Cfg_ptr));
+ Engines.push_back(new FGPiston(FDMExec, Cfg_ptr, numEngines));
} else if (engType == "FG_TURBINE") {
- Engines.push_back(new FGTurbine(FDMExec, Cfg_ptr));
+ Engines.push_back(new FGTurbine(FDMExec, Cfg_ptr, numEngines));
} else if (engType == "FG_SIMTURBINE") {
cerr << endl;
cerr << "The FG_SIMTURBINE engine type has been renamed to FG_TURBINE." << endl;
cerr << "To fix this problem, simply replace the FG_SIMTURBINE name " << endl;
cerr << "in your engine file to FG_TURBINE." << endl;
cerr << endl;
- Engines.push_back(new FGTurbine(FDMExec, Cfg_ptr));
+ Engines.push_back(new FGTurbine(FDMExec, Cfg_ptr, numEngines));
} else if (engType == "FG_ELECTRIC") {
- Engines.push_back(new FGElectric(FDMExec, Cfg_ptr));
+ Engines.push_back(new FGElectric(FDMExec, Cfg_ptr, numEngines));
} else {
cerr << fgred << " Unrecognized engine type: " << underon << engType
<< underoff << " found in config file." << fgdef << endl;
}
Engines[numEngines]->SetPlacement(xLoc, yLoc, zLoc, Pitch, Yaw);
- Engines[numEngines]->SetEngineNumber(numEngines);
numEngines++;
} else {
if (firstime) firstime = false;
else PropulsionStrings += ", ";
- PropulsionStrings += Engines[i]->GetEngineLabels() + ", ";
+ PropulsionStrings += Engines[i]->GetEngineLabels();
}
return PropulsionStrings;
if (firstime) firstime = false;
else PropulsionValues += ", ";
- PropulsionValues += Engines[i]->GetEngineValues() + ", ";
+ PropulsionValues += Engines[i]->GetEngineValues();
}
return PropulsionValues;
if (Tanks[i]->GetPctFull() < 99.99)
Transfer(-1, i, fillrate/TanksNotFull);
}
- }
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%