]> git.mxchange.org Git - flightgear.git/commitdiff
Downgrade the ridgelift to a subsystem of environment
authorTorsten Dreyer <Torsten@t3r.de>
Sun, 15 Aug 2010 18:33:29 +0000 (20:33 +0200)
committerTorsten Dreyer <Torsten@t3r.de>
Sun, 15 Aug 2010 18:33:29 +0000 (20:33 +0200)
src/Environment/environment_mgr.cxx
src/Main/fg_init.cxx

index 4a3fc96061ea8fb9be0e1a56c9df259ca5334c75..775e4a32aa982a70f9090cf93c74bf1ead2b73d5 100644 (file)
@@ -41,6 +41,7 @@
 #include "environment_ctrl.hxx"
 #include "fgclouds.hxx"
 #include "precipitation_mgr.hxx"
+#include "ridge_lift.hxx"
 
 class SGSky;
 extern SGSky *thesky;
@@ -65,10 +66,18 @@ FGEnvironmentMgr::FGEnvironmentMgr ()
 
   _precipitationManager = new FGPrecipitationMgr;
   set_subsystem("precipitation", _precipitationManager);
+
+  set_subsystem("ridgelift", new FGRidgeLift);
 }
 
 FGEnvironmentMgr::~FGEnvironmentMgr ()
 {
+  SGSubsystem * subsys;
+
+  subsys = get_subsystem( "ridgelift" );
+  remove_subsystem( "ridgelift" );
+  delete subsys;
+
   remove_subsystem("precipitation");
   delete _precipitationManager;
 
index 2db7f32e298ba291c8b6c34c250ba833c60b1915..b98d8dbbb28f82ee63612aa1f36cb3a2d0f87a78 100644 (file)
 #include <FDM/fdm_shell.hxx>
 
 #include <Environment/environment_mgr.hxx>
-#include <Environment/ridge_lift.hxx>
 
 #include "fg_init.hxx"
 #include "fg_io.hxx"
@@ -1349,13 +1348,6 @@ bool fgInitSubsystems() {
     // Initialize the weather modeling subsystem
     globals->add_subsystem("environment", new FGEnvironmentMgr);
 
-    ////////////////////////////////////////////////////////////////////
-    // Initialize the ridge lift simulation.
-    ////////////////////////////////////////////////////////////////////
-
-    // Initialize the ridgelift subsystem
-    globals->add_subsystem("ridgelift", new FGRidgeLift);
-
     ////////////////////////////////////////////////////////////////////
     // Initialize the aircraft systems and instrumentation (before the
     // autopilot.)