1
0
Fork 0

Probably fix for Bug 1972 - AI parking positions

https://sourceforge.net/p/flightgear/codetickets/1972/
This commit is contained in:
James Turner 2017-09-21 18:37:43 +01:00
parent 66eb3d2690
commit 69934e04a6

View file

@ -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;