]> git.mxchange.org Git - flightgear.git/blobdiff - src/Aircraft/controls.cxx
Revert "Fix compilation problem with MSVC 2012"
[flightgear.git] / src / Aircraft / controls.cxx
index dcd4a553bee1f96a58b540c8ee9c7470f2f42d13..772ab8e74942bfe75d27969e968560da920fe4a5 100644 (file)
@@ -215,7 +215,12 @@ FGControls::init ()
         alternate_extension[wheel] = false;
     }
 
-    auto_coordination = fgGetNode("/sim/auto-coordination", true);
+    auto_coordination = fgGetNode("/controls/flight/auto-coordination", true);
+    auto_coordination_factor = fgGetNode("/controls/flight/auto-coordination-factor", false );
+    if( NULL == auto_coordination_factor ) {
+      auto_coordination_factor = fgGetNode("/controls/flight/auto-coordination-factor", true );
+      auto_coordination_factor->setDoubleValue( 0.5 );
+    }
 }
 
 static inline void _SetRoot( simgear::TiedPropertyList & tiedProperties, const char * root, int index = 0 )
@@ -656,11 +661,7 @@ FGControls::set_aileron (double pos)
 {
     aileron = pos;
     SG_CLAMP_RANGE<double>( aileron, -1.0, 1.0 );
-
-    // check for autocoordination
-    if ( auto_coordination->getBoolValue() ) {
-        set_rudder( aileron / 2.0 );
-    }
+    do_autocoordination();
 }
 
 void
@@ -668,11 +669,7 @@ FGControls::move_aileron (double amt)
 {
     aileron += amt;
     SG_CLAMP_RANGE<double>( aileron, -1.0, 1.0 );
-
-    // check for autocoordination
-    if ( auto_coordination->getBoolValue() ) {
-        set_rudder( aileron / 2.0 );
-    }
+    do_autocoordination();
 }
 
 void