]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui_local.cxx
Patch from Andy Ross to allow virtual panel to tilt with mouse view:
[flightgear.git] / src / GUI / gui_local.cxx
index 37b3d3b4c904ee493b983efd10af51d53db9c064..f537d60890d6e37b582a75d3510387501c6828ac 100644 (file)
@@ -54,9 +54,13 @@ void reInit(puObject *cb)
     // BusyCursor(0);
     Quat0();
 
-    int freeze = globals->get_freeze();
-    if(!freeze)
-        globals->set_freeze( true );
+    static const SGPropertyNode *master_freeze
+       = fgGetNode("/sim/freeze/master");
+
+    bool freeze = master_freeze->getBoolValue();
+    if ( !freeze ) {
+        fgSetBool("/sim/freeze/master", true);
+    }
 
     cur_fdm_state->unbind();
 
@@ -69,13 +73,18 @@ 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) ?
@@ -89,7 +98,7 @@ void reInit(puObject *cb)
     // BusyCursor(1);
     
     if ( !freeze ) {
-        globals->set_freeze( false );
+        fgSetBool("/sim/freeze/master", false);
     }
 }