1
0
Fork 0

Support Dave Luff's AI plane if /sim/ai-traffic/enabled is set to

true.
This commit is contained in:
david 2002-10-02 15:25:58 +00:00
parent ab27c591b5
commit 03b508adb7
2 changed files with 8 additions and 5 deletions

View file

@ -992,9 +992,11 @@ bool fgInitSubsystems( void ) {
// 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.

View file

@ -91,7 +91,7 @@ SG_USING_STD(endl);
#include <ATC/ATCmgr.hxx>
#include <ATC/ATCdisplay.hxx>
//#include <ATC/AIMgr.hxx>
#include <ATC/AIMgr.hxx>
#include <Autopilot/newauto.hxx>
@ -1097,7 +1097,8 @@ static void fgMainLoop( void ) {
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