// Initialise the AI Manager
////////////////////////////////////////////////////////////////////
- SG_LOG(SG_GENERAL, SG_INFO, " AI Manager");
- // globals->set_AI_mgr(new FGAIMgr);
- // globals->get_AI_mgr()->init();
+ 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();
+ }
////////////////////////////////////////////////////////////////////
// Initialize the built-in commands.
#include <ATC/ATCmgr.hxx>
#include <ATC/ATCdisplay.hxx>
-//#include <ATC/AIMgr.hxx>
+#include <ATC/AIMgr.hxx>
#include <Autopilot/newauto.hxx>
globals->get_ATC_mgr()->update(delta_time_sec);
// Run the AI subsystem
- // globals->get_AI_mgr()->update(delta_time_sec);
+ if (fgGetBool("/sim/ai-traffic/enabled"))
+ globals->get_AI_mgr()->update(delta_time_sec);
// Run flight model