The one to fg_init.cxx initialises the AI subsystem regardless of whether it's enabled or not so that later enabling by the user doesn't crash it, and the one to main.cxx avoids running the ATC manager and ATC display system unless enabled.
// Initialise the AI Manager
////////////////////////////////////////////////////////////////////
- if (fgGetBool("/sim/ai-traffic/enabled")) {
- SG_LOG(SG_GENERAL, SG_INFO, " AI Manager");
- globals->set_AI_mgr(new FGAIMgr);
- globals->get_AI_mgr()->init();
- }
+ SG_LOG(SG_GENERAL, SG_INFO, " AI Manager");
+ globals->set_AI_mgr(new FGAIMgr);
+ globals->get_AI_mgr()->init();
#ifdef ENABLE_AUDIO_SUPPORT
// Use the hud_and_panel ssgSimpleState for rendering the ATC output
// This only works properly if called before the panel call
- globals->get_ATC_display()->update(delta_time_sec);
+ if((fgGetBool("/sim/ATC/enabled")) || (fgGetBool("/sim/ai-traffic/enabled")))
+ globals->get_ATC_display()->update(delta_time_sec);
// update the panel subsystem
if ( globals->get_current_panel() != NULL ) {
#endif
// Run ATC subsystem
- globals->get_ATC_mgr()->update(delta_time_sec);
+ if (fgGetBool("/sim/ATC/enabled"))
+ globals->get_ATC_mgr()->update(delta_time_sec);
// Run the AI subsystem
if (fgGetBool("/sim/ai-traffic/enabled"))