summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-12-02 21:35:44 +0000
committerrubidium <rubidium@openttd.org>2007-12-02 21:35:44 +0000
commitfe7684125518e751f6d36239669917a70ef9b1f3 (patch)
treecee21002f14652cb7ef7234081f0e4f93c7bbdaf
parent164d0a4710b4bc898abd5a1c31c827765fd8ed26 (diff)
downloadopenttd-fe7684125518e751f6d36239669917a70ef9b1f3.tar.xz
(svn r11562) -Fix [FS#1503] (r11546): aircraft sometimes stopped mid-air when the airport got destroyed.
-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 df79cb73d..b333746b2 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -1044,7 +1044,7 @@ static bool AircraftController(Vehicle *v)
/* Jump into our "holding pattern" state machine if possible */
if (v->u.air.pos >= afc->nofelements) {
v->u.air.pos = v->u.air.previous_pos = AircraftGetEntryPoint(v, afc);
- } else {
+ } else if (v->u.air.targetairport != v->current_order.dest) {
/* If not possible, just get out of here fast */
v->u.air.state = FLYING;
UpdateAircraftCache(v);