]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui_local.cxx
Moved random ground cover object management code (userdata.[ch]xx) over
[flightgear.git] / src / GUI / gui_local.cxx
index df6ac67e1272c653af7eb4c735dca0400a491ec5..018760e98239d752cd6e1d7d44c27ddf961c2c3b 100644 (file)
@@ -6,7 +6,7 @@
 #  include <windows.h>
 #endif
 
-#include <GL/glut.h>        // needed before pu.h
+#include GLUT_H                 // needed before pu.h
 #include <plib/pu.h>        // plib include
 
 #include <FDM/flight.hxx>
@@ -20,9 +20,6 @@
 #include "gui.h"
 #include "trackball.h"
 
-// from main.cxx
-extern void fgReshape(int, int);
-
 // FOR MOUSE VIEW MODE
 // stashed trackball(_quat0, 0.0, 0.0, 0.0, 0.0);
 static float _quat0[4];
@@ -73,13 +70,9 @@ void reInit(puObject *cb)
 
     globals->restoreInitialState();
 
-    // Unsuccessful KLUDGE to fix the 'every other time'
-    // problem when doing a 'reset' after a 'goto airport'
-       
-    // string AptId( fgGetString("/sim/startup/airport-id") );
-    // if( AptId.c_str() != "\0" )
-    //      fgSetPosFromAirportID( AptId );
-       
+    // update our position based on current presets
+    fgInitPosition();
+
     SGTime *t = globals->get_time_params();
     delete t;
     t = fgInitTime();
@@ -87,10 +80,7 @@ void reInit(puObject *cb)
 
     fgReInitSubsystems();
 
-    // reduntant(fgReInitSubsystems) ?
-    double visibility_meters = fgGetDouble("/environment/visibility-m");
-    global_tile_mgr.update( fgGetDouble("/position/longitude-deg"),
-                            fgGetDouble("/position/latitude-deg"),visibility_meters );
+    globals->get_tile_mgr()->update( fgGetDouble("/environment/visibility-m") );
     
     cur_light_params.Update();