(svn r11562) -Fix [FS#1503] (r11546): aircraft sometimes stopped mid-air when the airport got destroyed.
authorrubidium
Sun, 02 Dec 2007 21:35:44 +0000
changeset 8003 c171c650d1e3
parent 8002 d1f1f351c606
child 8004 1c54bc6f4bdf
(svn r11562) -Fix [FS#1503] (r11546): aircraft sometimes stopped mid-air when the airport got destroyed.
src/aircraft_cmd.cpp
--- a/src/aircraft_cmd.cpp	Sun Dec 02 20:13:12 2007 +0000
+++ b/src/aircraft_cmd.cpp	Sun Dec 02 21:35:44 2007 +0000
@@ -1044,7 +1044,7 @@
 		/* 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);