1
0
Fork 0

Bugfix: Change the point where leg numbers recycle, in order to avoid hitting the default case in AIFlightPlan::create().

This commit is contained in:
Durk Talsma 2011-08-01 21:34:33 +02:00
parent 2c1de98ef3
commit 4928886e56
2 changed files with 3 additions and 2 deletions

View 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);
}

View 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;
}