From 89a7516c62ddd4bf8ef2bfb84cb80541f208680c Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Wed, 3 Dec 2014 10:29:30 +0100 Subject: [PATCH] Fix hangs while scenery-loading 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Traffic/TrafficMgr.cxx b/src/Traffic/TrafficMgr.cxx index 4641d3f21..c4abd8364 100644 --- a/src/Traffic/TrafficMgr.cxx +++ b/src/Traffic/TrafficMgr.cxx @@ -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(globals->get_subsystem("terrasync")); bool doDataSync = fgGetBool("/sim/terrasync/ai-data-enabled"); -- 2.39.5