# HG changeset patch # User Ricardo@FX-8150 # Date 1516902918 0 # Thu Jan 25 17:55:18 2018 +0000 # Branch trunk # Node ID 0edc5e2cf3813c42cff138c372f0b977ae7fde99 # Parent 437a5c7b0b81f96fe16ab21e1fd51e37226e1115 1 diff -r 437a5c7b0b81 -r 0edc5e2cf381 src/aircraft_cmd.cpp --- a/src/aircraft_cmd.cpp Tue Jan 23 18:45:40 2018 +0000 +++ b/src/aircraft_cmd.cpp Thu Jan 25 17:55:18 2018 +0000 @@ -126,16 +126,12 @@ const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type); FOR_ALL_STATIONS(st) { - if (st->owner != v->owner || !(st->facilities & FACIL_AIRPORT)) continue; + if (st->owner != v->owner || !(st->facilities & FACIL_AIRPORT) || !st->airport.HasHangar()) continue; const AirportFTAClass *afc = st->airport.GetFTA(); - if (!st->airport.HasHangar() || ( - /* don't crash the plane if we know it can't land at the airport */ - (afc->flags & AirportFTAClass::SHORT_STRIP) && - (avi->subtype & AIR_FAST) && - !_cheats.no_jetcrash.value)) { - continue; - } + + /* don't crash the plane if we know it can't land at the airport */ + if ((afc->flags & AirportFTAClass::SHORT_STRIP) && (avi->subtype & AIR_FAST) && !_cheats.no_jetcrash.value) continue; /* v->tile can't be used here, when aircraft is flying v->tile is set to 0 */ uint distance = DistanceSquare(vtile, st->airport.tile);