]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_init.cxx
adding changed files for previous commit.
[flightgear.git] / src / Main / fg_init.cxx
index 0e83ba131b952db0859ab0286f97fa38747f93b5..7d3e6ce2859a96c804ab3501dfd246bc73ce06dc 100644 (file)
@@ -77,6 +77,7 @@
 #include <ATCDCL/ATCmgr.hxx>
 #include <ATCDCL/commlist.hxx>
 #include <ATC/atis_mgr.hxx>
+#include <ATC/atc_mgr.hxx>
 
 #include <Autopilot/route_mgr.hxx>
 #include <Autopilot/autopilotgroup.hxx>
@@ -1384,6 +1385,10 @@ bool fgInitSubsystems() {
 
     ////////////////////////////////////////////////////////////////////
     // Initialise the ATC Manager
+    // Note that this is old stuff, but might be necessesary for the 
+    // current ATIS implementation. Therefore, leave it in here
+    // until the ATIS system is ported over to make use of the ATIS 
+    // sub system infrastructure.
     ////////////////////////////////////////////////////////////////////
 
     SG_LOG(SG_GENERAL, SG_INFO, "  ATC Manager");
@@ -1391,7 +1396,11 @@ bool fgInitSubsystems() {
     globals->get_ATC_mgr()->init(); 
 
     ////////////////////////////////////////////////////////////////////
-    // Initialise the ATIS Manager
+   // Initialize the ATC subsystem
+    ////////////////////////////////////////////////////////////////////
+    globals->add_subsystem("ATC", new FGATCManager, SGSubsystemMgr::POST_FDM);
+    ////////////////////////////////////////////////////////////////////
+    // Initialise the ATIS Subsystem
     ////////////////////////////////////////////////////////////////////
     globals->add_subsystem("atis", new FGAtisManager, SGSubsystemMgr::POST_FDM);
 
@@ -1517,7 +1526,7 @@ bool fgInitSubsystems() {
     return true;
 }
 
-
+// Reset: this is what the 'reset' command (and hence, GUI) is attached to
 void fgReInitSubsystems()
 {
     static const SGPropertyNode *master_freeze
@@ -1553,12 +1562,17 @@ void fgReInitSubsystems()
     // Initialize the FDM
     globals->get_subsystem("flight")->reinit();
 
+    // reset replay buffers
+    globals->get_subsystem("replay")->reinit();
+    
     // reload offsets from config defaults
     globals->get_viewmgr()->reinit();
 
     globals->get_subsystem("time")->reinit();
-    globals->get_subsystem("tile-manager")->reinit();
-    
+
+    // need to bind FDMshell again, since we manually unbound it above...
+    globals->get_subsystem("flight")->bind();
+
 // setup state to end re-init
     fgSetBool("/sim/signals/reinit", false);
     if ( !freeze ) {
@@ -1568,13 +1582,6 @@ void fgReInitSubsystems()
 }
 
 
-void doSimulatorReset(void)  // from gui_local.cxx -- TODO merge with fgReInitSubsystems()
-{
-    
-
-    fgReInitSubsystems();
-}
-
 ///////////////////////////////////////////////////////////////////////////////
 // helper object to implement the --show-aircraft command.
 // resides here so we can share the fgFindAircraftInDir template above,