From 3c60bf651169eec2a68e435bdf56929640212796 Mon Sep 17 00:00:00 2001 From: Durk Talsma Date: Sun, 27 Jun 2010 10:08:26 +0200 Subject: [PATCH] Make sure also not to try running AI_mgr when compiling fgfs with --disable-atcdcl. FlightGear can now actually run without segfaulting when compiled this way. --- src/Main/main.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 54d403461..01d205aa4 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -346,14 +346,18 @@ static void fgMainLoop( void ) { // Run ATC subsystem if (fgGetBool("/sim/atc/enabled")) globals->get_ATC_mgr()->update(delta_time_sec); -#endif + // 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); - +#endif globals->get_subsystem_mgr()->update(delta_time_sec); globals->get_aircraft_model()->update(delta_time_sec);