Traffic manager can also be enabled at run-time, so "ai enabled" check
also needs to be moved for traffic.
return;
}
- if (!aiEnabled)
- {
- // traffic depends on AI module
- aiEnabled = true;
- }
-
assert(!doingInit);
doingInit = true;
if (string(fgGetString("/sim/traffic-manager/datafile")) == string("")) {
void FGTrafficManager::update(double /*dt */ )
{
- if (!enabled || !aiEnabled || (realWxEnabled && !metarValid)) {
+ if (!enabled || (realWxEnabled && !metarValid)) {
return;
}
-
+
+ if (!aiEnabled)
+ {
+ // traffic depends on AI module
+ aiEnabled = true;
+ }
+
if (!inited) {
if (!doingInit) {
init();