]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/native_ctrls.cxx
Mixture is on channel 6.
[flightgear.git] / src / Network / native_ctrls.cxx
index e09763749c41050763b93079416649ee2f1016de..e5c79b2f740c52994879b5cad06549990731755c 100644 (file)
@@ -71,11 +71,14 @@ static void global2raw( const FGControls *global, FGRawCtrls *raw ) {
        raw->mixture[i] = globals->get_controls()->get_mixture(i);
        raw->prop_advance[i] = globals->get_controls()->get_prop_advance(i);
     }
+    for ( i = 0; i < FGRawCtrls::FG_MAX_TANKS; ++i ) {
+        raw->fuel_selector[i] = globals->get_controls()->get_fuel_selector(i);
+    }
     for ( i = 0; i < FGRawCtrls::FG_MAX_WHEELS; ++i ) {
        raw->brake[i] =  globals->get_controls()->get_brake(i);
     }
 
-    raw->hground = scenery.get_cur_elev();
+    raw->hground = globals->get_scenery()->get_cur_elev();
 }
 
 
@@ -93,11 +96,14 @@ static void raw2global( const FGRawCtrls *raw, FGControls *global ) {
            globals->get_controls()->set_mixture( i, raw->mixture[i] );
            globals->get_controls()->set_prop_advance( i, raw->prop_advance[i]);
        }
+       for ( i = 0; i < FGRawCtrls::FG_MAX_TANKS; ++i ) {
+           globals->get_controls()->set_fuel_selector( i, raw->fuel_selector[i] );
+       }
        for ( i = 0; i < FGRawCtrls::FG_MAX_WHEELS; ++i ) {
            globals->get_controls()->set_brake( i, raw->brake[i] );
        }
        globals->get_controls()->set_gear_down( raw->gear_handle );
-       scenery.set_cur_elev( raw->hground );
+       globals->get_scenery()->set_cur_elev( raw->hground );
     } else {
        SG_LOG( SG_IO, SG_ALERT, "Error: version mismatch in raw2global()" );
        SG_LOG( SG_IO, SG_ALERT,