Loading

Paste #pzu5bb9wk

  1. diff -r 23785f2ffa5d src/aircraft_cmd.cpp
  2. --- a/src/aircraft_cmd.cpp  Thu Jan 25 14:47:43 2018 +0000
  3. +++ b/src/aircraft_cmd.cpp  Thu Jan 25 15:31:38 2018 +0000
  4. @@ -133,6 +133,9 @@
  5.         /* don't crash the plane if we know it can't land at the airport */
  6.         if ((afc->flags & AirportFTAClass::SHORT_STRIP) && (avi->subtype & AIR_FAST) && !_cheats.no_jetcrash.value) continue;
  7.  
  8. +       /* the plane won't land at any helicopter station */
  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);

Version history

Revision # Author Created at
pwoeggskh Anonymous 25 Jan 2018, 15:17:20 UTC Diff

Comments