summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-04-06 18:30:45 +0000
committerrubidium <rubidium@openttd.org>2013-04-06 18:30:45 +0000
commitaa2c1ce4b078e5b54be7c1853ccd6a36c917b1e2 (patch)
treeeb1a7d48a18d90373c6a5aff51acffe6c5e2aa95 /src/saveload
parent6772aebbb683fba3a436830042cfddfa60917d8d (diff)
downloadopenttd-aa2c1ce4b078e5b54be7c1853ccd6a36c917b1e2.tar.xz
(svn r25152) -Fix-ish [FS#5520]: remove stray reservation from savegames affected by FS#5510 et al. upon loading
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index a3837942c..91ba3a5e8 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2770,6 +2770,14 @@ bool AfterLoadGame()
v->acceleration = avi->acceleration;
}
}
+
+ /* Blocked tiles could be reserved due to a bug, which causes
+ * other places to assert upon e.g. station reconstruction. */
+ for (TileIndex t = 0; t < map_size; t++) {
+ if (HasStationTileRail(t) && IsStationTileBlocked(t)) {
+ SetRailStationReservation(t, false);
+ }
+ }
}
/* Road stops is 'only' updating some caches */