]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlan.cxx
model paging patch from Till Busch
[flightgear.git] / src / AIModel / AIFlightPlan.cxx
index febaf3d1518e4c2f8f06ca07efa51d1e34c49ec9..48af6afb81ae5d916a88ce3b3e808bf7be0dad98 100644 (file)
@@ -192,8 +192,8 @@ FGAIFlightPlan::FGAIFlightPlan(const std::string& p,
        leg = 4;
       else if (timeDiff >= 2000)
        leg = 5;
-      
-      //cerr << "Set leg to : " << leg << endl;  
+
+      SG_LOG(SG_GENERAL, SG_INFO, "Route from " << dep->getId() << " to " << arr->getId() << ". Set leg to : " << leg);
       wpt_iterator = waypoints.begin();
       create(dep,arr, leg, alt, speed, lat, lon,
             firstLeg, radius, fltType, acType, airline);
@@ -298,8 +298,7 @@ FGAIFlightPlan::FGAIFlightPlan(const std::string& p,
 FGAIFlightPlan::~FGAIFlightPlan()
 {
   deleteWaypoints();
-  if (taxiRoute)
-    delete taxiRoute;
+  delete taxiRoute;
 }
 
 
@@ -349,6 +348,7 @@ void FGAIFlightPlan::IncrementWaypoint(bool eraseWaypoints )
     }
   else
     wpt_iterator++;
+
 }
 
 // gives distance in feet from a position to a waypoint
@@ -491,8 +491,7 @@ void FGAIFlightPlan::restart()
 
 void FGAIFlightPlan::deleteTaxiRoute() 
 {
-  if (taxiRoute)
-    delete taxiRoute;
+  delete taxiRoute;
   taxiRoute = 0;
 }