1
0
Fork 0

Downgrade the ridgelift to a subsystem of environment

This commit is contained in:
Torsten Dreyer 2010-08-15 20:33:29 +02:00
parent 10eadf0c6e
commit 60f7d0f16c
2 changed files with 9 additions and 8 deletions

View file

@ -41,6 +41,7 @@
#include "environment_ctrl.hxx" #include "environment_ctrl.hxx"
#include "fgclouds.hxx" #include "fgclouds.hxx"
#include "precipitation_mgr.hxx" #include "precipitation_mgr.hxx"
#include "ridge_lift.hxx"
class SGSky; class SGSky;
extern SGSky *thesky; extern SGSky *thesky;
@ -65,10 +66,18 @@ FGEnvironmentMgr::FGEnvironmentMgr ()
_precipitationManager = new FGPrecipitationMgr; _precipitationManager = new FGPrecipitationMgr;
set_subsystem("precipitation", _precipitationManager); set_subsystem("precipitation", _precipitationManager);
set_subsystem("ridgelift", new FGRidgeLift);
} }
FGEnvironmentMgr::~FGEnvironmentMgr () FGEnvironmentMgr::~FGEnvironmentMgr ()
{ {
SGSubsystem * subsys;
subsys = get_subsystem( "ridgelift" );
remove_subsystem( "ridgelift" );
delete subsys;
remove_subsystem("precipitation"); remove_subsystem("precipitation");
delete _precipitationManager; delete _precipitationManager;

View file

@ -109,7 +109,6 @@
#include <FDM/fdm_shell.hxx> #include <FDM/fdm_shell.hxx>
#include <Environment/environment_mgr.hxx> #include <Environment/environment_mgr.hxx>
#include <Environment/ridge_lift.hxx>
#include "fg_init.hxx" #include "fg_init.hxx"
#include "fg_io.hxx" #include "fg_io.hxx"
@ -1349,13 +1348,6 @@ bool fgInitSubsystems() {
// Initialize the weather modeling subsystem // Initialize the weather modeling subsystem
globals->add_subsystem("environment", new FGEnvironmentMgr); 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 // Initialize the aircraft systems and instrumentation (before the
// autopilot.) // autopilot.)