1
0
Fork 0

Make FGAircraftModel behave like a standarrd subsystem.

This commit is contained in:
James Turner 2010-10-02 16:09:02 +01:00
parent a1137ed940
commit d39841d2df
3 changed files with 1 additions and 21 deletions

View file

@ -1262,14 +1262,6 @@ bool fgInitGeneral() {
return true;
}
// Initialize view parameters
void fgInitView() {
// force update of model so that viewer can get some data...
globals->get_aircraft_model()->update(0);
// run update for current view so that data is current...
globals->get_viewmgr()->update(0);
}
// This is the top level init routine which calls all the other
// initialization routines. If you are adding a subsystem to flight
// gear, its initialization call should located in this routine.
@ -1355,12 +1347,6 @@ bool fgInitSubsystems() {
globals->add_subsystem( "xml-autopilot", FGXMLAutopilotGroup::createInstance(), SGSubsystemMgr::FDM );
globals->add_subsystem( "route-manager", new FGRouteMgr );
////////////////////////////////////////////////////////////////////
// Initialize the view manager subsystem.
////////////////////////////////////////////////////////////////////
fgInitView();
////////////////////////////////////////////////////////////////////
// Initialize the Input-Output subsystem
@ -1542,8 +1528,6 @@ void fgReInitSubsystems()
// reload offsets from config defaults
globals->get_viewmgr()->reinit();
fgInitView();
globals->get_controls()->reset_all();
globals->get_subsystem("time")->reinit();

View file

@ -189,7 +189,6 @@ FGGlobals::~FGGlobals()
delete viewmgr;
// delete commands;
delete acmodel;
delete model_mgr;
delete channel_options_list;
delete initial_waypoints;

View file

@ -158,7 +158,6 @@ static void fgMainLoop( void ) {
#endif
globals->get_subsystem_mgr()->update(sim_dt);
globals->get_aircraft_model()->update(sim_dt);
// run Nasal's settimer() loops right before the view manager
globals->get_event_mgr()->update(sim_dt);
@ -404,9 +403,7 @@ static void fgIdleFunction ( void ) {
////////////////////////////////////////////////////////////////////
FGAircraftModel* acm = new FGAircraftModel;
globals->set_aircraft_model(acm);
//globals->add_subsystem("aircraft-model", acm);
acm->init();
acm->bind();
globals->add_subsystem("aircraft-model", acm, SGSubsystemMgr::DISPLAY);
////////////////////////////////////////////////////////////////////
// Initialize the view manager subsystem.