summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-03-25 11:29:33 +0000
committermichi_cc <michi_cc@openttd.org>2012-03-25 11:29:33 +0000
commit8254b5a7e6b2d0fb8ede62326b7939d8bd34a26e (patch)
treecc46a60598ee79bcea7c5f34f23cc7d19bf206d5
parent8d423137fdd0b550a6560fffb094e5be092f8704 (diff)
downloadopenttd-8254b5a7e6b2d0fb8ede62326b7939d8bd34a26e.tar.xz
(svn r24060) -Fix [FS#5123] (r23504): Do not freeze aircraft mid-flight when skipping to an out-of-range destination.
-rw-r--r--src/aircraft_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index b18b9c50e..7bdba7dea 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -1894,7 +1894,7 @@ static bool AircraftEventHandler(Aircraft *v, int loop)
if (v->current_order.IsType(OT_LOADING) || v->current_order.IsType(OT_LEAVESTATION)) return true;
- if (v->state == FLYING) {
+ if (v->state >= ENDTAKEOFF && v->state <= HELIENDLANDING) {
/* If we are flying, unconditionally clear the 'dest too far' state. */
AircraftHandleDestTooFar(v, false);
} else if (v->acache.cached_max_range_sqr != 0) {