2 | + if (!(afc->flags & AirportFTAClass::AIRPLANES) && (avi->subtype & AIR_CTOL)) continue; | 9 | + if (!(afc->flags & AirportFTAClass::AIRPLANES) && (avi->subtype & AIR_CTOL)) continue;
|
---|
| | 10 | +
|
---|
| | 11 | /* v->tile can't be used here, when aircraft is flying v->tile is set to 0 */
|
---|
| | 12 | uint distance = DistanceSquare(vtile, st->airport.tile);
|
---|
| | 13 | if (v->acache.cached_max_range_sqr != 0) {
|
---|
| | 14 | @@ -374,7 +377,7 @@
|
---|
| | 15 | {
|
---|
| | 16 | const Station *st = GetTargetAirportIfValid(this);
|
---|
| | 17 | /* If the station is not a valid airport or if it has no hangars */
|
---|
| | 18 | - if (st == NULL || !st->airport.HasHangar()) {
|
---|
| | 19 | + if (st == NULL || !CanVehicleUseStation(this, st) || !st->airport.HasHangar()) {
|
---|
| | 20 | /* the aircraft has to search for a hangar on its own */
|
---|
| | 21 | StationID station = FindNearestHangar(this); |
---|