diff options
author | rubidium <rubidium@openttd.org> | 2007-05-29 08:19:37 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-29 08:19:37 +0000 |
commit | e831fb4d5ec9bfd66bf367efbf8ad43a4f62bb00 (patch) | |
tree | 909652bf8b460a59f178be26ab88747b1c94203a | |
parent | 67fec6c7a7570090e5ca90e6646aabcd43f9cd80 (diff) | |
download | openttd-e831fb4d5ec9bfd66bf367efbf8ad43a4f62bb00.tar.xz |
(svn r9971) -Fix (r9892, r9958): loading of post-'bridges over "everything"' messed with the railtype of bridges.
-rw-r--r-- | src/openttd.cpp | 5 |
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; |