]> git.mxchange.org Git - flightgear.git/blobdiff - src/Traffic/TrafficMgr.cxx
Modified Files:
[flightgear.git] / src / Traffic / TrafficMgr.cxx
index 70e8af64491c3e94e7654255e19846fe426b8b5c..86be2196cb2e02e4da8b1a76152f65bda97089f3 100644 (file)
@@ -124,7 +124,8 @@ void FGTrafficManager::init()
    */ 
   SGPath path = aircraftDir;
   path.append("Traffic/fgtraffic.xml");
-  readXML(path.str(),*this);
+  if (path.exists())
+    readXML(path.str(),*this);
 
   aircraftDir.append("AI/Aircraft");
   if (aircraftDir.exists())
@@ -169,12 +170,15 @@ void FGTrafficManager::init()
 void FGTrafficManager::update(double /*dt*/)
 {
   //SG_LOG( SG_GENERAL, SG_INFO, "Running TrafficManager::Update() ");
+  // Hack alert: Skip running for the first frames 1000 after 
+  // initialization to allow proper initialization of wheather stuff 
+  // and runway assignments
   if (runCount < 1000)
     {
       runCount++;
       return;
     }
-  runCount = 0;
+  //runCount = 0;
   time_t now = time(NULL) + fgGetLong("/sim/time/warp");
   if (scheduledAircraft.size() == 0) {
     //SG_LOG( SG_GENERAL, SG_INFO, "Returned Running TrafficManager::Update() ");