From c33d779e5a4d70e3b7ed924db2f8e96f529e80ed Mon Sep 17 00:00:00 2001 From: smatz Date: Thu, 11 Sep 2008 17:41:43 +0000 Subject: (svn r14290) -Fix (r13932): level crossings could be barred when they shouldn't be after savegame conversion --- src/openttd.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/openttd.cpp') 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(); -- cgit v1.2.3-54-g00ecf