]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIManager.cxx
toggle fullscreen: also adapt GUI plane when resizing
[flightgear.git] / src / AIModel / AIManager.cxx
index 7f7b5bab25c13b45b96adfe2d7aa290f916b8586..c5ea283fc56c6eacf30b25ac7309dd2923900329 100644 (file)
@@ -89,6 +89,15 @@ FGAIManager::init() {
 void
 FGAIManager::postinit() {
     // postinit, so that it can access the Nasal subsystem
+
+    if (!root->getBoolValue("scenarios-enabled", true))
+        return;
+
+    // scenarios enabled, AI subsystem required
+    if (!enabled->getBoolValue())
+        enabled->setBoolValue(true);
+
+    // process all scenarios
     map<string, bool> scenarios;
     for (int i = 0 ; i < root->nChildren() ; i++) {
         SGPropertyNode *n = root->getChild(i);