From b20d1eee6cb4bd7282f66a324dd65332de9d9ec1 Mon Sep 17 00:00:00 2001 From: smatz Date: Thu, 17 Jan 2008 19:49:06 +0000 Subject: (svn r11908) -Fix: update crossing when merging a company, when building a crossing and after loading older savegame --- src/openttd.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/openttd.cpp') diff --git a/src/openttd.cpp b/src/openttd.cpp index 2dfd6e050..b1753490a 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -65,6 +65,7 @@ #include "vehicle_func.h" #include "sound_func.h" #include "variables.h" +#include "road_func.h" #include "bridge_map.h" #include "clear_map.h" @@ -2313,6 +2314,13 @@ bool AfterLoadGame() } } + if (CheckSavegameVersion(86)) { + /* Now all crossings should be in correct state */ + for (TileIndex t = 0; t < map_size; t++) { + if (IsLevelCrossingTile(t)) UpdateLevelCrossing(t); + } + } + return InitializeWindowsAndCaches(); } -- cgit v1.2.3-54-g00ecf