virtual void addAutopilot( const std::string & name, SGPropertyNode_ptr apNode, SGPropertyNode_ptr config );
virtual void removeAutopilot( const std::string & name );
void init();
+ InitStatus incrementalInit();
void reinit();
void update( double dt );
private:
init();
}
+SGSubsystem::InitStatus FGXMLAutopilotGroupImplementation::incrementalInit()
+{
+ init();
+ return INIT_DONE;
+}
+
void FGXMLAutopilotGroupImplementation::init()
{
initFrom( fgGetNode( "/sim/systems" ), _nodeName.c_str() );
delete _3dCloudsEnableListener;
}
-void
-FGEnvironmentMgr::init ()
+SGSubsystem::InitStatus FGEnvironmentMgr::incrementalInit()
{
- SG_LOG( SG_ENVIRONMENT, SG_INFO, "Initializing environment subsystem");
- SGSubsystemGroup::init();
- fgClouds->Init();
-
- // FIXME: is this really part of the environment_mgr?
- // Initialize the longitude, latitude and altitude to the initial position
- // of the aircraft so that the atmospheric properties (pressure, temperature
- // and density) can be initialized accordingly.
- _altitude_n->setDoubleValue(fgGetDouble("/sim/presets/altitude-ft"));
- _longitude_n->setDoubleValue(fgGetDouble("/sim/presets/longitude-deg"));
- _latitude_n->setDoubleValue(fgGetDouble("/sim/presets/latitude-deg"));
- globals->get_event_mgr()->addTask("updateClosestAirport", this,
- &FGEnvironmentMgr::updateClosestAirport, 30 );
+ InitStatus r = SGSubsystemGroup::incrementalInit();
+ if (r == INIT_DONE) {
+ fgClouds->Init();
+
+ // FIXME: is this really part of the environment_mgr?
+ // Initialize the longitude, latitude and altitude to the initial position
+ // of the aircraft so that the atmospheric properties (pressure, temperature
+ // and density) can be initialized accordingly.
+ _altitude_n->setDoubleValue(fgGetDouble("/sim/presets/altitude-ft"));
+ _longitude_n->setDoubleValue(fgGetDouble("/sim/presets/longitude-deg"));
+ _latitude_n->setDoubleValue(fgGetDouble("/sim/presets/latitude-deg"));
+
+ globals->get_event_mgr()->addTask("updateClosestAirport", this,
+ &FGEnvironmentMgr::updateClosestAirport, 30 );
+ }
+
+ return r;
}
void
FGEnvironmentMgr ();
virtual ~FGEnvironmentMgr ();
- virtual void init ();
+ virtual InitStatus incrementalInit ();
virtual void reinit ();
virtual void shutdown ();
virtual void bind ();
simgear::TiedPropertyList _tiedProperties;
SGPropertyChangeListener * _3dCloudsEnableListener;
SGSky* _sky;
-
};
#endif // _ENVIRONMENT_MGR_HXX