summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-09-11 17:41:43 +0000
committersmatz <smatz@openttd.org>2008-09-11 17:41:43 +0000
commitef03a416310d78524d3597b28b20f636a31e87ad (patch)
treec8599d036571c5b7ae9888477f3900c22ef00638 /src
parent9431bf1c2929e8e46251c468d862a3ce0dfd778f (diff)
downloadopenttd-ef03a416310d78524d3597b28b20f636a31e87ad.tar.xz
(svn r14290) -Fix (r13932): level crossings could be barred when they shouldn't be after savegame conversion
Diffstat (limited to 'src')
-rw-r--r--src/openttd.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index e37e60627..f43fee95d 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -2342,9 +2342,6 @@ bool AfterLoadGame()
if (CheckSavegameVersion(86)) {
for (TileIndex t = 0; t < map_size; t++) {
- /* Now all crossings should be in correct state */
- if (IsLevelCrossingTile(t)) UpdateLevelCrossing(t, false);
-
/* Move river flag and update canals to use water class */
if (IsTileType(t, MP_WATER)) {
if (GetWaterClass(t) != WATER_CLASS_RIVER) {
@@ -2545,6 +2542,14 @@ bool AfterLoadGame()
}
}
+ if (CheckSavegameVersion(102)) {
+ for (TileIndex t = 0; t < map_size; t++) {
+ /* Now all crossings should be in correct state */
+ if (IsLevelCrossingTile(t)) UpdateLevelCrossing(t, false);
+ }
+ }
+
+
GamelogPrintDebug(1);
return InitializeWindowsAndCaches();