]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/JSBSim.cxx
Make yasim accept the launchbar and hook properties. They are not tied to anything...
[flightgear.git] / src / FDM / JSBSim / JSBSim.cxx
index 6a69fef387881fa86062b18244104f617b8eef7a..3129a961ec7c12c9a1649143f2fa23785c418650 100644 (file)
@@ -2,7 +2,7 @@
 //
 // Written by Curtis Olson, started February 1999.
 //
-// Copyright (C) 1999  Curtis L. Olson  - http://www.flightgear.org/~curt
+// Copyright (C) 1999  Curtis L. Olson  - curt@flightgear.org
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
@@ -171,7 +171,8 @@ FGJSBsim::FGJSBsim( double dt )
         node->setDoubleValue("level-gal_us", Propulsion->GetTank(i)->GetContents() / 6.6);
       }
     }
-
+    Propulsion->SetFuelFreeze((fgGetNode("/sim/freeze/fuel",true))->getBoolValue());
+    
     fgSetDouble("/fdm/trim/pitch-trim", FCS->GetPitchTrimCmd());
     fgSetDouble("/fdm/trim/throttle",   FCS->GetThrottleCmd(0));
     fgSetDouble("/fdm/trim/aileron",    FCS->GetDaCmd());
@@ -503,7 +504,8 @@ bool FGJSBsim::copy_to_JSBsim()
     }
     SGPropertyNode* node = fgGetNode("/systems/refuel", true);
     Propulsion->SetRefuel(node->getDoubleValue("contact"));
-
+    Propulsion->SetFuelFreeze((fgGetNode("/sim/freeze/fuel",true))->getBoolValue());
+    
     return true;
 }
 
@@ -692,11 +694,9 @@ bool FGJSBsim::copy_from_JSBsim()
 
     }
 
-    static const SGPropertyNode *fuel_freeze = fgGetNode("/sim/freeze/fuel");
-
     // Copy the fuel levels from JSBSim if fuel
     // freeze not enabled.
-    if ( ! fuel_freeze->getBoolValue() ) {
+    if ( ! Propulsion->GetFuelFreeze() ) {
       for (i = 0; i < Propulsion->GetNumTanks(); i++) {
         SGPropertyNode * node = fgGetNode("/consumables/fuel/tank", i, true);
         FGTank* tank = Propulsion->GetTank(i);