]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/util.cxx
- Added ultra-light traffic is now a separate traffic class that can have its
[flightgear.git] / src / Main / util.cxx
index 3daeb991b712c4696cb481b59bc14dc958a73339..c6efd7b0a5e33b1bca426f198c81ffb4ff8dde69 100644 (file)
@@ -32,6 +32,9 @@ SG_USING_STD(vector);
 #include "globals.hxx"
 #include "util.hxx"
 
+#ifdef OSG_LIBRARY_STATIC
+#include "osgDB/Registry"
+#endif
 
 void
 fgDefaultWeatherValue (const char * propname, double value)
@@ -104,11 +107,9 @@ fgSetupWind (double min_hdg, double max_hdg, double speed, double gust)
 void
 fgExit (int status)
 {
-    // remove subsystems first, which need access to other subsystems in their
-    // destructors (e.g. "nasal")
-    SGSubsystem *sub = globals->get_subsystem("ai_model");
-    globals->get_subsystem_mgr()->get_group(SGSubsystemMgr::GENERAL)->remove_subsystem("ai_model");
-    delete sub;
+#ifdef OSG_LIBRARY_STATIC
+    osgDB::Registry::instance( true);
+#endif
 
     SG_LOG(SG_GENERAL, SG_INFO, "Exiting FlightGear with status " << status);
     exit(status);
@@ -120,7 +121,7 @@ double
 fgGetLowPass (double current, double target, double timeratio)
 {
     if ( timeratio < 0.0 ) {
-       if ( timeratio < -1.0 ) {
+        if ( timeratio < -1.0 ) {
                                 // time went backwards; kill the filter
                 current = target;
         } else {