]> git.mxchange.org Git - flightgear.git/blobdiff - src/Traffic/Schedule.cxx
Fix two bugs in the new autopilot code
[flightgear.git] / src / Traffic / Schedule.cxx
index 517bb3c2117b5e6e1b0000ec91bcc833672b85e7..3b990e377d3364213c27d6269af5ee5e3a2f28a9 100644 (file)
@@ -201,15 +201,17 @@ bool FGAISchedule::update(time_t now, const SGVec3d& userCart)
   
   if (firstRun) {
      if (fgGetBool("/sim/traffic-manager/instantaneous-action") == true) {
-         deptime = now + rand() % 300; // Wait up to 5 minutes until traffic starts moving to prevent too many aircraft 
+         deptime = now; // + rand() % 300; // Wait up to 5 minutes until traffic starts moving to prevent too many aircraft 
                                    // from cluttering the gate areas.
      }
      firstRun = false;
   }
   
   FGScheduledFlight* flight = flights.front();
-  if (!deptime)
+  if (!deptime) {
     deptime = flight->getDepartureTime();
+    //cerr << "Settiing departure time " << deptime << endl;
+  }
     
   if (AIManagerRef) {
     // Check if this aircraft has been released.