]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/globals.cxx
Linux needs stdarg.h for va_args
[flightgear.git] / src / Main / globals.cxx
index 51f202b4960d72f2785ed5498c32a2478f8a8c4f..767dcb5a242728a7b21f89f5fb5afca24e887b7a 100644 (file)
@@ -85,7 +85,6 @@ public:
         }
         
         if (r.exists()) {
-          SG_LOG(SG_IO, SG_DEBUG, "found path:" << aResource << " via /sim/aircraft-dir: " << r.str());
           return r;
         }
     }
@@ -97,7 +96,6 @@ public:
     for (; it != dirs.end(); ++it) {
       SGPath p(*it, res);
       if (p.exists()) {
-        SG_LOG(SG_IO, SG_DEBUG, "found path:" << aResource << " in aircraft dir: " << *it);
         return p;
       }
     } // of aircraft path iteration
@@ -187,13 +185,17 @@ FGGlobals::~FGGlobals()
     // deallocation of AIModel objects. To ensure we can safely
     // shut down all subsystems, make sure we take down the 
     // AIModels system first.
-    SGSubsystem* ai = subsystem_mgr->remove("ai-model");
+    SGSubsystem* ai = globals->get_subsystem("ai-model");
     if (ai) {
         ai->unbind();
-        delete ai;
+        subsystem_mgr->remove("ai-model");
     }
-    SGSubsystem* sound = subsystem_mgr->remove("sound");
-
+    
+    subsystem_mgr->remove("fx");
+    subsystem_mgr->remove("sound");
+    subsystem_mgr->remove("tile-manager");
+    subsystem_mgr->remove("model-manager");
+    
     subsystem_mgr->shutdown();
     subsystem_mgr->unbind();
     delete subsystem_mgr;
@@ -213,7 +215,6 @@ FGGlobals::~FGGlobals()
     delete fontcache;
 
     delete channellist;
-    delete sound;
 
     delete locale;
     locale = NULL;