Codechange: split GetRoadDir as bays have DiagDir and drive throughs have Axis

This commit is contained in:
Rubidium
2024-10-22 23:25:07 +02:00
committed by rubidium42
parent d6aa09f96a
commit c9819f8957
11 changed files with 100 additions and 56 deletions

View File

@@ -45,8 +45,8 @@ RoadBits GetAnyRoadBits(Tile tile, RoadTramType rtt, bool straight_tunnel_bridge
case MP_STATION:
if (!IsAnyRoadStopTile(tile)) return ROAD_NONE;
if (IsDriveThroughStopTile(tile)) return (GetRoadStopDir(tile) == DIAGDIR_NE) ? ROAD_X : ROAD_Y;
return DiagDirToRoadBits(GetRoadStopDir(tile));
if (IsDriveThroughStopTile(tile)) return AxisToRoadBits(GetDriveThroughStopAxis(tile));
return DiagDirToRoadBits(GetBayRoadStopDir(tile));
case MP_TUNNELBRIDGE:
if (GetTunnelBridgeTransportType(tile) != TRANSPORT_ROAD) return ROAD_NONE;