summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-29 08:19:37 +0000
committerrubidium <rubidium@openttd.org>2007-05-29 08:19:37 +0000
commit17b6ce80c7e6f1d7092ca46563b747e40814c84c (patch)
tree909652bf8b460a59f178be26ab88747b1c94203a
parent191845f736f37fdd3b6a7cebd6de8715d207dcf0 (diff)
downloadopenttd-17b6ce80c7e6f1d7092ca46563b747e40814c84c.tar.xz
(svn r9971) -Fix (r9892, r9958): loading of post-'bridges over "everything"' messed with the railtype of bridges.
-rw-r--r--src/openttd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 5d8762319..a5fa6ffca 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1446,6 +1446,7 @@ bool AfterLoadGame()
if (CheckSavegameVersion(61)) {
/* Added the RoadType */
+ bool old_bridge = CheckSavegameVersion(42);
for (TileIndex t = 0; t < map_size; t++) {
switch(GetTileType(t)) {
case MP_STREET:
@@ -1470,7 +1471,9 @@ bool AfterLoadGame()
break;
case MP_TUNNELBRIDGE:
- if ((IsTunnel(t) ? GetTunnelTransportType(t) : (TransportType)GB(_m[t].m5, 1, 2)) == TRANSPORT_ROAD) {
+ /* Middle part of "old" bridges */
+ if (old_bridge && IsBridgeTile(t) && HASBIT(_m[t].m5, 6)) break;
+ if ((IsTunnel(t) ? GetTunnelTransportType(t) : (old_bridge ? (TransportType)GB(_m[t].m5, 1, 2) : GetBridgeTransportType(t))) == TRANSPORT_ROAD) {
SetRoadTypes(t, ROADTYPES_ROAD);
}
break;