]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlan.cxx
backport from JSBSim/cvs: apply prop sense only once (OK'ed by JSB)
[flightgear.git] / src / AIModel / AIFlightPlan.cxx
index 2d1887582eda1e42151cbd26e78b861d918d2445..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;
 }
 
 
@@ -492,8 +491,7 @@ void FGAIFlightPlan::restart()
 
 void FGAIFlightPlan::deleteTaxiRoute() 
 {
-  if (taxiRoute)
-    delete taxiRoute;
+  delete taxiRoute;
   taxiRoute = 0;
 }