]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/FGPropulsion.cpp
Sync. with JSBSim CVS
[flightgear.git] / src / FDM / JSBSim / models / FGPropulsion.cpp
index 57d2852f3c46c9fe9a897018e312dc3496dae9ff..32d8b42a1df129d58b4b7f022b926f9d6a9107f7 100644 (file)
@@ -307,18 +307,23 @@ bool FGPropulsion::Load(Element* el)
     try {
       if (type == "piston_engine") {
         HavePistonEngine = true;
+        if (!IsBound) bind();
         Engines.push_back(new FGPiston(FDMExec, document, numEngines));
       } else if (type == "turbine_engine") {
         HaveTurbineEngine = true;
+        if (!IsBound) bind();
         Engines.push_back(new FGTurbine(FDMExec, document, numEngines));
       } else if (type == "turboprop_engine") {
         HaveTurboPropEngine = true;
+        if (!IsBound) bind();
         Engines.push_back(new FGTurboProp(FDMExec, document, numEngines));
       } else if (type == "rocket_engine") {
         HaveRocketEngine = true;
+        if (!IsBound) bind();
         Engines.push_back(new FGRocket(FDMExec, document, numEngines));
       } else if (type == "electric_engine") {
         HaveElectricEngine = true;
+        if (!IsBound) bind();
         Engines.push_back(new FGElectric(FDMExec, document, numEngines));
       } else {
         cerr << "Unknown engine type: " << type << endl;
@@ -345,7 +350,6 @@ bool FGPropulsion::Load(Element* el)
   if (el->FindElement("dump-rate"))
     DumpRate = el->FindElementValueAsNumberConvertTo("dump-rate", "LBS/MIN");
 
-  if (!IsBound) bind();
   PostLoad(el, PropertyManager);
 
   return true;