diff options
author | Samu <dj_samu@hotmail.com> | 2018-10-01 14:56:12 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-01-27 11:17:32 +0100 |
commit | 2084779b5a9d16d6d04744c913960fd59bde2356 (patch) | |
tree | 547e2f93fd6b0062fca431813bad150883c2e17e | |
parent | a5836874ef824f63d81e12064aba2f5c762109e8 (diff) | |
download | openttd-2084779b5a9d16d6d04744c913960fd59bde2356.tar.xz |
Fix #6574: Go to takeoff if no hangar
Sends the aircraft to takeoff if the airport it's currently at, got no hangar even if the order is to go to hangar.
-rw-r--r-- | src/aircraft_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 6799f7c64..5f36a7577 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1546,7 +1546,7 @@ static void AircraftEventHandler_AtTerminal(Aircraft *v, const AirportFTAClass * go_to_hangar = Station::Get(v->targetairport)->airport.HasHangar(); } - if (go_to_hangar) { + if (go_to_hangar && Station::Get(v->targetairport)->airport.HasHangar()) { v->state = HANGAR; } else { /* airplane goto state takeoff, helicopter to helitakeoff */ |