]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/native_gui.cxx
Logging: less verbose panel loading.
[flightgear.git] / src / Network / native_gui.cxx
index b9e3678279f2da67e5abfa1765fc07261d2dd3e9..9171822521f119071b6f9588642dc4a1f6d93bac 100644 (file)
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -136,7 +136,7 @@ void FGProps2NetGUI( FGNetGUI *net ) {
        = fgGetNode("/instrumentation/nav/radials/reciprocal-radial-deg", true);
     static SGPropertyNode *nav_gs_deflection
        = fgGetNode("/instrumentation/nav/gs-needle-deflection", true);
-    int i;
+    unsigned int i;
 
     // Version sanity checking
     net->version = FG_NET_GUI_VERSION;
@@ -163,7 +163,7 @@ void FGProps2NetGUI( FGNetGUI *net ) {
     // Environment
     net->cur_time = globals->get_time_params()->get_cur_time();
     net->warp = globals->get_warp();
-    net->ground_elev = globals->get_scenery()->get_cur_elev();
+    net->ground_elev = cur_fdm_state->get_Runway_altitude_m();
 
     // Approach
     net->tuned_freq = nav_freq->getDoubleValue();
@@ -237,7 +237,7 @@ void FGProps2NetGUI( FGNetGUI *net ) {
 
     htonf(net->tuned_freq);
     htonf(net->nav_radial);
-    net->in_range = htonl(net->in_range);
+    net->in_range = htonl( net->in_range );
     htonf(net->dist_nm);
     htonf(net->course_deviation_deg);
     htonf(net->gs_deviation_deg);
@@ -246,7 +246,7 @@ void FGProps2NetGUI( FGNetGUI *net ) {
 
 
 void FGNetGUI2Props( FGNetGUI *net ) {
-    int i;
+    unsigned int i;
 
 #if defined( FG_USE_NETWORK_BYTE_ORDER )
     // Convert to the net buffer from network format
@@ -271,7 +271,8 @@ void FGNetGUI2Props( FGNetGUI *net ) {
     net->ground_elev = htonl( net->ground_elev );
 
     htonf(net->tuned_freq);
-    net->in_range = htonl(net->in_range);
+    htonf(net->nav_radial);
+    net->in_range = htonl( net->in_range );
     htonf(net->dist_nm);
     htonf(net->course_deviation_deg);
     htonf(net->gs_deviation_deg);
@@ -303,13 +304,12 @@ void FGNetGUI2Props( FGNetGUI *net ) {
        }
 
         globals->set_warp( net->warp );
-        globals->get_scenery()->set_cur_elev( net->ground_elev );
 
         // Approach
         fgSetDouble( "/instrumentation/nav[0]/frequencies/selected-mhz",
                      net->tuned_freq );
         fgSetBool( "/instrumentation/nav[0]/in-range", net->in_range );
-        fgSetDouble( "/instrumentation/dme/distance-nm", net->dist_nm );
+        fgSetDouble( "/instrumentation/dme/indicated-distance-nm", net->dist_nm );
         fgSetDouble( "/instrumentation/nav[0]/heading-needle-deflection",
                      net->course_deviation_deg );
         fgSetDouble( "/instrumentation/nav[0]/gs-needle-deflection",