]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_props.cxx
Fixed a problem with autodetecting if we need to draw our own mouse cursor
[flightgear.git] / src / Main / fg_props.cxx
index 46bc65838e97dc5e360cc003ab0f03e35a7c18e6..30c337e9a4f77a4f50b36e1c9a2373a9d3434bb9 100644 (file)
@@ -45,7 +45,16 @@ fgSaveFlight (ostream &output)
 bool
 fgLoadFlight (istream &input)
 {
-  return readProperties(input, globals->get_props());
+  SGPropertyNode props;
+  if (readProperties(input, &props)) {
+    copyProperties(&props, globals->get_props());
+                               // When loading a flight, make it the
+                               // new initial state.
+    globals->saveInitialState();
+  } else {
+    FG_LOG(FG_INPUT, FG_ALERT, "Error restoring flight; aborted");
+    return false;
+  }
 }
 
 // end of fg_props.cxx