From 17b6ce80c7e6f1d7092ca46563b747e40814c84c Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 29 May 2007 08:19:37 +0000 Subject: (svn r9971) -Fix (r9892, r9958): loading of post-'bridges over "everything"' messed with the railtype of bridges. --- src/openttd.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2