From 36929535d7c1e2909ed5705c9dfe87e7203320b0 Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 3 Jun 2005 15:25:19 +0000 Subject: [PATCH] Fix some more of my own stupidity. --- src/Network/native_ctrls.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Network/native_ctrls.cxx b/src/Network/native_ctrls.cxx index 5cdfcb740..411b4703f 100644 --- a/src/Network/native_ctrls.cxx +++ b/src/Network/native_ctrls.cxx @@ -239,6 +239,8 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes, htond(net->flaps); net->flaps_power = htonl(net->flaps_power); net->flap_motor_ok = htonl(net->flap_motor_ok); + + net->num_engines = htonl(net->num_engines); for ( i = 0; i < FGNetCtrls::FG_MAX_ENGINES; ++i ) { net->master_bat[i] = htonl(net->master_bat[i]); net->master_alt[i] = htonl(net->master_alt[i]); @@ -256,11 +258,12 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes, net->oil_press_status[i] = htonl(net->oil_press_status[i]); net->fuel_pump_ok[i] = htonl(net->fuel_pump_ok[i]); } - net->num_engines = htonl(net->num_engines); + + net->num_tanks = htonl(net->num_tanks); for ( i = 0; i < FGNetCtrls::FG_MAX_TANKS; ++i ) { net->fuel_selector[i] = htonl(net->fuel_selector[i]); } - net->num_tanks = htonl(net->num_tanks); + net->cross_feed = htonl(net->cross_feed); htond(net->brake_left); htond(net->brake_right); @@ -303,7 +306,7 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, htond(net->flaps); net->flaps_power = htonl(net->flaps_power); net->flap_motor_ok = htonl(net->flap_motor_ok); - net->num_engines = htonl(net->num_engines); + for ( i = 0; i < (int)net->num_engines; ++i ) { net->master_bat[i] = htonl(net->master_bat[i]); net->master_alt[i] = htonl(net->master_alt[i]); @@ -321,10 +324,13 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, net->oil_press_status[i] = htonl(net->oil_press_status[i]); net->fuel_pump_ok[i] = htonl(net->fuel_pump_ok[i]); } - net->num_tanks = htonl(net->num_tanks); + net->num_engines = htonl(net->num_engines); + for ( i = 0; i < FGNetCtrls::FG_MAX_TANKS; ++i ) { net->fuel_selector[i] = htonl(net->fuel_selector[i]); } + net->num_tanks = htonl(net->num_tanks); + net->cross_feed = htonl(net->cross_feed); htond(net->brake_left); htond(net->brake_right);