]> git.mxchange.org Git - flightgear.git/blobdiff - src/Aircraft/aircraft.cxx
Roy Vegard Ovesen:
[flightgear.git] / src / Aircraft / aircraft.cxx
index e88fb83e4f2d76f9e1fa2d391b30f65d048c1a0f..a3fcd9e47c0bd3029a4f7db932de9b9cf2b41ba2 100644 (file)
@@ -30,8 +30,8 @@
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
-#include <simgear/misc/commands.hxx>
-#include <simgear/misc/exception.hxx>
+#include <simgear/structure/commands.hxx>
+#include <simgear/structure/exception.hxx>
 
 #include <Main/globals.hxx>
 #include <Main/fg_props.hxx>
@@ -40,8 +40,6 @@
 #include <Cockpit/hud.hxx>
 #include <Cockpit/panel_io.hxx>
 #include <Model/acmodel.hxx>
-#include <Autopilot/newauto.hxx>
-#include <Main/fgfs.hxx>
 
 #include "aircraft.hxx"
 
@@ -140,7 +138,7 @@ void fgReadAircraft(void) {
    globals->get_commands()->addCommand("load-aircraft", fgLoadAircraft);
 }
 
-static bool
+bool
 fgLoadAircraft (const SGPropertyNode * arg)
 {
     static const SGPropertyNode *master_freeze
@@ -229,9 +227,9 @@ fgLoadAircraft (const SGPropertyNode * arg)
     //
     globals->get_viewmgr()->reinit();
     globals->get_controls()->reset_all();
-    globals->get_autopilot()->reset();
     globals->get_aircraft_model()->reinit();
     globals->get_subsystem("fx")->reinit();
+    globals->get_subsystem("xml-autopilot")->reinit();
 
     fgReInitSubsystems();