Loading

Paste #p5u9jypr5

  1. Index: src/aircraft_cmd.cpp
  2. ===================================================================
  3. --- src/aircraft_cmd.cpp    (revision 27967)
  4. +++ src/aircraft_cmd.cpp    (working copy)
  5. @@ -126,17 +126,13 @@
  6.     const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type);
  7.  
  8.     FOR_ALL_STATIONS(st) {
  9. -       if (st->owner != v->owner || !(st->facilities & FACIL_AIRPORT)) continue;
  10. +       if (st->owner != v->owner || !(st->facilities & FACIL_AIRPORT) || !st->airport.HasHangar()) continue;
  11.  
  12.         const AirportFTAClass *afc = st->airport.GetFTA();
  13. -       if (!st->airport.HasHangar() || (
  14. -                   /* don't crash the plane if we know it can't land at the airport */
  15. -                   (afc->flags & AirportFTAClass::SHORT_STRIP) &&
  16. -                   (avi->subtype & AIR_FAST) &&
  17. -                   !_cheats.no_jetcrash.value)) {
  18. -           continue;
  19. -       }
  20.  
  21. +       /* don't crash the plane if we know it can't land at the airport */
  22. +       if ((afc->flags & AirportFTAClass::SHORT_STRIP) && (avi->subtype & AIR_FAST) && !_cheats.no_jetcrash.value) continue;
  23. +
  24.         /* v->tile can't be used here, when aircraft is flying v->tile is set to 0 */
  25.         uint distance = DistanceSquare(vtile, st->airport.tile);
  26.         if (v->acache.cached_max_range_sqr != 0) {

Comments