summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-01-17 19:49:06 +0000
committersmatz <smatz@openttd.org>2008-01-17 19:49:06 +0000
commitb20d1eee6cb4bd7282f66a324dd65332de9d9ec1 (patch)
tree34528ac5e4eacd82e0b40b87f08e3bae4aa5c964 /src/openttd.cpp
parente0f759f71e82ce2c68438b91646e35c29b44d85b (diff)
downloadopenttd-b20d1eee6cb4bd7282f66a324dd65332de9d9ec1.tar.xz
(svn r11908) -Fix: update crossing when merging a company, when building a crossing and after loading older savegame
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp8
1 files changed, 8 insertions, 0 deletions
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();
}