Mercurial > hg > openttd
changeset 10892:86098964d396 draft
(svn r15227) -Fix [FS#2571](r1): aircraft could be 'loading in the air' after converting old savegames
author | smatz <smatz@openttd.org> |
---|---|
date | Fri, 23 Jan 2009 15:37:44 +0000 |
parents | 4c37fc0ec65c |
children | 74bb96a3148e |
files | src/saveload/vehicle_sl.cpp |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -181,6 +181,10 @@ 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);