Loading

Paste #pqrfsoghu

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

Comments