Probably fix for Bug 1972 - AI parking positions
https://sourceforge.net/p/flightgear/codetickets/1972/
This commit is contained in:
parent
66eb3d2690
commit
69934e04a6
1 changed files with 9 additions and 4 deletions
|
@ -167,7 +167,6 @@ FGAirportDynamics::FGAirportDynamics(FGAirport * ap):
|
|||
// Destructor
|
||||
FGAirportDynamics::~FGAirportDynamics()
|
||||
{
|
||||
SG_LOG(SG_AI, SG_INFO, "destroyed dynamics for:" << _ap->ident());
|
||||
}
|
||||
|
||||
|
||||
|
@ -183,12 +182,18 @@ FGParking* FGAirportDynamics::innerGetAvailableParking(double radius, const stri
|
|||
bool skipEmptyAirlineCode)
|
||||
{
|
||||
const FGParkingList& parkings(parent()->groundNetwork()->allParkings());
|
||||
FGParkingList::const_iterator it;
|
||||
for (it = parkings.begin(); it != parkings.end(); ++it) {
|
||||
FGParkingRef parking = *it;
|
||||
for (auto parking : parkings) {
|
||||
if (!isParkingAvailable(parking)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (parking->getRadius() < radius) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!flType.empty() && (parking->getType() != flType)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (skipEmptyAirlineCode && parking->getCodes().empty()) {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue