diff options
author | tron <tron@openttd.org> | 2006-06-07 19:35:21 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-07 19:35:21 +0000 |
commit | be88e269b918b365695e84cfa962e8d21b98e759 (patch) | |
tree | 5a6fb4aa93546ad194301d231de10ba5370ccc6f /road_map.c | |
parent | ace071529e2116f92aeec50d3bac0f95953b129b (diff) | |
download | openttd-be88e269b918b365695e84cfa962e8d21b98e759.tar.xz |
(svn r5155) - Remove the bridge branch merge (revision r5070)
Diffstat (limited to 'road_map.c')
-rw-r--r-- | road_map.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/road_map.c b/road_map.c index 1c1040476..8702f7692 100644 --- a/road_map.c +++ b/road_map.c @@ -27,12 +27,22 @@ RoadBits GetAnyRoadBits(TileIndex tile) return DiagDirToRoadBits(GetRoadStopDir(tile)); case MP_TUNNELBRIDGE: - if (IsTunnel(tile)) { + if (IsBridge(tile)) { + if (IsBridgeMiddle(tile)) { + if (!IsTransportUnderBridge(tile) || + GetBridgeTransportType(tile) != TRANSPORT_ROAD) { + return 0; + } + return GetRoadBitsUnderBridge(tile); + } else { + // ending + if (GetBridgeTransportType(tile) != TRANSPORT_ROAD) return 0; + return DiagDirToRoadBits(ReverseDiagDir(GetBridgeRampDirection(tile))); + } + } else { + // tunnel if (GetTunnelTransportType(tile) != TRANSPORT_ROAD) return 0; return DiagDirToRoadBits(ReverseDiagDir(GetTunnelDirection(tile))); - } else { - if (GetBridgeTransportType(tile) != TRANSPORT_ROAD) return 0; - return DiagDirToRoadBits(ReverseDiagDir(GetBridgeRampDirection(tile))); } default: return 0; |