summaryrefslogtreecommitdiff
path: root/road_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'road_map.c')
-rw-r--r--road_map.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/road_map.c b/road_map.c
index 8702f7692..1c1040476 100644
--- a/road_map.c
+++ b/road_map.c
@@ -27,22 +27,12 @@ RoadBits GetAnyRoadBits(TileIndex tile)
return DiagDirToRoadBits(GetRoadStopDir(tile));
case MP_TUNNELBRIDGE:
- 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 (IsTunnel(tile)) {
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;