summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-11-23 18:26:02 +0000
committerrubidium <rubidium@openttd.org>2010-11-23 18:26:02 +0000
commit33e3d7f6a22c938e4ed39183fa80bd13aa66b006 (patch)
treeb751c7eb7920f08f3716389be15234138feae039 /src
parentd9173858a2740eee017ba2177c054e44d1842a3c (diff)
downloadopenttd-33e3d7f6a22c938e4ed39183fa80bd13aa66b006.tar.xz
(svn r21299) -Fix (r21263): a road vehicle in a depot or wormhole could get into an incorrect state upon savegame conversion causing it to break up later in the game
Diffstat (limited to 'src')
-rw-r--r--src/saveload/afterload.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 982c3254a..8be8e2861 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2380,6 +2380,8 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(153)) {
RoadVehicle *rv;
FOR_ALL_ROADVEHICLES(rv) {
+ if (rv->state == RVSB_IN_DEPOT || rv->state == RVSB_WORMHOLE) continue;
+
bool loading = rv->current_order.IsType(OT_LOADING) || rv->current_order.IsType(OT_LEAVESTATION);
if (HasBit(rv->state, RVS_IN_ROAD_STOP)) {
extern const byte _road_stop_stop_frame[];