]> git.mxchange.org Git - flightgear.git/commitdiff
Fix hangs while scenery-loading
authorTorsten Dreyer <torsten@ŧ3r.de>
Wed, 3 Dec 2014 09:29:30 +0000 (10:29 +0100)
committerTorsten Dreyer <torsten@ŧ3r.de>
Wed, 3 Dec 2014 09:29:30 +0000 (10:29 +0100)
don't start the traffic manager before the FDM is initialized
The FDM needs the scenery loaded and will wait for all PagedLOD Nodes
to appear if they are close (less than 1000m) to our initial position.
That's required for scenery models but not for AI traffic.

src/Traffic/TrafficMgr.cxx

index 4641d3f21519a79babe159008ea2e2d9853c3401..c4abd836426d65ff0b007fdf61903c9f305ae717 100644 (file)
@@ -492,6 +492,12 @@ void FGTrafficManager::init()
       return;
     }
 
+    // TorstenD: don't start the traffic manager before the FDM is initialized
+    // The FDM needs the scenery loaded and will wait for our spawned AIModels PagedLOD Nodes 
+    // to appear if they are close (less than 1000m) to our position
+    if( !fgGetBool("/sim/signals/fdm-initialized") )
+      return;
+
     assert(!doingInit);
     simgear::SGTerraSync* terraSync = static_cast<simgear::SGTerraSync*>(globals->get_subsystem("terrasync"));
     bool doDataSync = fgGetBool("/sim/terrasync/ai-data-enabled");