]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui_local.cxx
Patch from Jim Wilson:
[flightgear.git] / src / GUI / gui_local.cxx
index e351f5099af4fa7ca3f794a0d8d884368feabb57..df6ac67e1272c653af7eb4c735dca0400a491ec5 100644 (file)
@@ -73,18 +73,24 @@ void reInit(puObject *cb)
 
     globals->restoreInitialState();
 
-       // Unsuccessful KLUDGE to fix the 'every other time'
-       // problem when doing a 'reset' after a 'goto airport'
+    // 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 );
+    // string AptId( fgGetString("/sim/startup/airport-id") );
+    // if( AptId.c_str() != "\0" )
+    //      fgSetPosFromAirportID( AptId );
        
+    SGTime *t = globals->get_time_params();
+    delete t;
+    t = fgInitTime();
+    globals->set_time_params( t );
+
     fgReInitSubsystems();
 
     // reduntant(fgReInitSubsystems) ?
+    double visibility_meters = fgGetDouble("/environment/visibility-m");
     global_tile_mgr.update( fgGetDouble("/position/longitude-deg"),
-                            fgGetDouble("/position/latitude-deg") );
+                            fgGetDouble("/position/latitude-deg"),visibility_meters );
     
     cur_light_params.Update();