summaryrefslogtreecommitdiff
path: root/src/road_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/road_map.cpp')
-rw-r--r--src/road_map.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/road_map.cpp b/src/road_map.cpp
index 2d236b504..a39fa5fc9 100644
--- a/src/road_map.cpp
+++ b/src/road_map.cpp
@@ -14,7 +14,7 @@
#include "tunnelbridge_map.h"
-RoadBits GetAnyRoadBits(TileIndex tile, RoadType rt)
+RoadBits GetAnyRoadBits(TileIndex tile, RoadType rt, bool straight_tunnel_bridge_entrance)
{
if (!HasTileRoadType(tile, rt)) return ROAD_NONE;
@@ -34,7 +34,9 @@ RoadBits GetAnyRoadBits(TileIndex tile, RoadType rt)
case MP_TUNNELBRIDGE:
if (GetTunnelBridgeTransportType(tile) != TRANSPORT_ROAD) return ROAD_NONE;
- return DiagDirToRoadBits(ReverseDiagDir(GetTunnelBridgeDirection(tile)));
+ return straight_tunnel_bridge_entrance ?
+ AxisToRoadBits(DiagDirToAxis(GetTunnelBridgeDirection(tile))) :
+ DiagDirToRoadBits(ReverseDiagDir(GetTunnelBridgeDirection(tile)));
default: return ROAD_NONE;
}