Make FGAircraftModel behave like a standarrd subsystem.
This commit is contained in:
parent
a1137ed940
commit
d39841d2df
3 changed files with 1 additions and 21 deletions
|
@ -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();
|
||||
|
|
|
@ -189,7 +189,6 @@ FGGlobals::~FGGlobals()
|
|||
delete viewmgr;
|
||||
|
||||
// delete commands;
|
||||
delete acmodel;
|
||||
delete model_mgr;
|
||||
delete channel_options_list;
|
||||
delete initial_waypoints;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue