// implementation is an AI model and depends on that
globals->get_multiplayer_mgr()->Update();
+#if ENABLE_ATCDCL
// Run ATC subsystem
if (fgGetBool("/sim/atc/enabled"))
globals->get_ATC_mgr()->update(delta_time_sec);
+
// Run the AI subsystem
- // FIXME: run that also if we have multiplaying enabled since the
- // multiplayer information is interpreted by an AI model
+ // NOTE: the AI_mgr has nothing to do with the AIModels subsystem.
+ // There was previously a comment here stating that the
+ // AI_mgr code should be run then multiplayer is enabled.
+ // Multiplayer relies on AIModels, and not on the old and
+ // depricated AI_mgr system. So, we can safely skip the following
+ // two lines at compile time when compiling with --disable-atcdcl
if (fgGetBool("/sim/ai-traffic/enabled"))
globals->get_AI_mgr()->update(delta_time_sec);
-
- globals->get_aircraft_model()->update(delta_time_sec);
+#endif
+
globals->get_subsystem_mgr()->update(delta_time_sec);
-
+ globals->get_aircraft_model()->update(delta_time_sec);
+
//
// Tile Manager updates - see if we need to load any new scenery tiles.
// this code ties together the fdm, viewer and scenery classes...
// END Tile Manager udpates
if (!scenery_loaded && globals->get_tile_mgr()->isSceneryLoaded()
- && fgGetBool("sim/signals/fdm-initialized")) {
+ && fgGetBool("sim/fdm-initialized")) {
fgSetBool("sim/sceneryloaded",true);
if (fgGetBool("/sim/sound/working")) {
globals->get_soundmgr()->activate();
} else if ( idle_state == 2 ) {
idle_state++;
- // Read the list of available aircraft
- fgReadAircraft();
+
fgSplashProgress("reading airport & navigation data");
Ephemeris* eph = new Ephemeris;
globals->add_subsystem("ephmeris", eph);
eph->init(); // FIXME - remove this once SGSky code below is also a subsystem
+ eph->bind();
// TODO: move to environment mgr
thesky = new SGSky;
// setup OpenGL view parameters
globals->get_renderer()->init();
- SG_LOG( SG_GENERAL, SG_INFO, "Panel visible = " << fgPanelVisible() );
globals->get_renderer()->resize( fgGetInt("/sim/startup/xsize"),
fgGetInt("/sim/startup/ysize") );
fgRegisterIdleHandler( &fgIdleFunction );
fgRegisterDrawHandler( &FGRenderer::update );
-#ifdef FG_ENABLE_MULTIPASS_CLOUDS
- bool get_stencil_buffer = true;
-#else
- bool get_stencil_buffer = false;
-#endif
-
// Initialize plib net interface
netInit( &argc, argv );
// Clouds3D requires an alpha channel
- // clouds may require stencil buffer
- fgOSOpenWindow(get_stencil_buffer);
+ fgOSOpenWindow(true /* request stencil buffer */);
// Initialize the splash screen right away
fntInit();