Bugfix: Change the point where leg numbers recycle, in order to avoid hitting the default case in AIFlightPlan::create().
This commit is contained in:
parent
2c1de98ef3
commit
4928886e56
2 changed files with 3 additions and 2 deletions
|
@ -413,12 +413,12 @@ const char * FGAIAircraft::_getTransponderCode() const {
|
||||||
bool FGAIAircraft::loadNextLeg(double distance) {
|
bool FGAIAircraft::loadNextLeg(double distance) {
|
||||||
|
|
||||||
int leg;
|
int leg;
|
||||||
if ((leg = fp->getLeg()) == 10) {
|
if ((leg = fp->getLeg()) == 9) {
|
||||||
if (!trafficRef->next()) {
|
if (!trafficRef->next()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
setCallSign(trafficRef->getCallSign());
|
setCallSign(trafficRef->getCallSign());
|
||||||
leg = 1;
|
leg = 0;
|
||||||
fp->setLeg(leg);
|
fp->setLeg(leg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -821,6 +821,7 @@ bool FGAIFlightPlan::createDescent(FGAIAircraft * ac, FGAirport * apt,
|
||||||
//cerr << "Repositioning to waypoint " << (*waypoints.begin())->name << endl;
|
//cerr << "Repositioning to waypoint " << (*waypoints.begin())->name << endl;
|
||||||
ac->resetPositionFromFlightPlan();
|
ac->resetPositionFromFlightPlan();
|
||||||
}
|
}
|
||||||
|
waypoints[1]->setName( (waypoints[1]->getName() + string("legend")));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue