summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-01-23 15:37:44 +0000
committersmatz <smatz@openttd.org>2009-01-23 15:37:44 +0000
commitbba42dc0fe183878b7bdc1a795d0d96aa845b684 (patch)
tree83f9fb3c64abd1ff85aeb97cd4ac57afbe645a9a /src
parent6301d1cc0acfdb20f2049bb2f94968d6a01fd216 (diff)
downloadopenttd-bba42dc0fe183878b7bdc1a795d0d96aa845b684.tar.xz
(svn r15227) -Fix [FS#2571](r1): aircraft could be 'loading in the air' after converting old savegames
Diffstat (limited to 'src')
-rw-r--r--src/saveload/vehicle_sl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index 33f043b45..1afd2b4f4 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -181,6 +181,10 @@ void UpdateOldAircraft()
AircraftLeaveHangar(v_oldstyle); // make airplane visible if it was in a depot for example
v_oldstyle->vehstatus &= ~VS_STOPPED; // make airplane moving
+ if (!v_oldstyle->current_order.IsType(OT_GOTO_STATION) && !v_oldstyle->current_order.IsType(OT_GOTO_DEPOT)) {
+ /* reset current order so aircraft doesn't have invalid "station-only" order */
+ v_oldstyle->current_order.MakeDummy();
+ }
v_oldstyle->u.air.state = FLYING;
AircraftNextAirportPos_and_Order(v_oldstyle); // move it to the entry point of the airport
GetNewVehiclePosResult gp = GetNewVehiclePos(v_oldstyle);