]> git.mxchange.org Git - flightgear.git/commitdiff
Bugfix: Change the point where leg numbers recycle, in order to avoid hitting the...
authorDurk Talsma <durk@localhost.(none)>
Mon, 1 Aug 2011 19:34:33 +0000 (21:34 +0200)
committerDurk Talsma <durk@localhost.(none)>
Mon, 1 Aug 2011 19:34:33 +0000 (21:34 +0200)
src/AIModel/AIAircraft.cxx
src/AIModel/AIFlightPlanCreate.cxx

index 9d630d683df6ede500096f36e129eb3cf7bf58de..30b7cf9d3be6f2dbe7781e2f28867b91af66c093 100644 (file)
@@ -413,12 +413,12 @@ const char * FGAIAircraft::_getTransponderCode() const {
 bool FGAIAircraft::loadNextLeg(double distance) {
 
     int leg;
-    if ((leg = fp->getLeg())  == 10) {
+    if ((leg = fp->getLeg())  == 9) {
         if (!trafficRef->next()) {
             return false;
         }
         setCallSign(trafficRef->getCallSign());
-        leg = 1;
+        leg = 0;
         fp->setLeg(leg);
     }
 
index e438ac4d169eef07777875d0ef7beeaa9ae65ee2..884bf25b6730afeb7caf33b98ceef2bbe9132d17 100644 (file)
@@ -821,6 +821,7 @@ bool FGAIFlightPlan::createDescent(FGAIAircraft * ac, FGAirport * apt,
         //cerr << "Repositioning to waypoint " << (*waypoints.begin())->name << endl;
         ac->resetPositionFromFlightPlan();
     }
+    waypoints[1]->setName( (waypoints[1]->getName() + string("legend"))); 
     return true;
 }