mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-30 01:49:10 +00:00
(svn r11562) -Fix [FS#1503] (r11546): aircraft sometimes stopped mid-air when the airport got destroyed.
This commit is contained in:
@@ -1044,7 +1044,7 @@ static bool AircraftController(Vehicle *v)
|
|||||||
/* Jump into our "holding pattern" state machine if possible */
|
/* Jump into our "holding pattern" state machine if possible */
|
||||||
if (v->u.air.pos >= afc->nofelements) {
|
if (v->u.air.pos >= afc->nofelements) {
|
||||||
v->u.air.pos = v->u.air.previous_pos = AircraftGetEntryPoint(v, afc);
|
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 */
|
/* If not possible, just get out of here fast */
|
||||||
v->u.air.state = FLYING;
|
v->u.air.state = FLYING;
|
||||||
UpdateAircraftCache(v);
|
UpdateAircraftCache(v);
|
||||||
|
Reference in New Issue
Block a user