Loading

Paste #pcxatigno

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

Comments