@@ -1497,12 +1497,14 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
14971497 EndSpriteCombine ();
14981498 } else if (transport_type == TRANSPORT_RAIL) {
14991499 const RailTypeInfo *rti = GetRailTypeInfo (GetRailType (ti->tile ));
1500- SpriteID surface = rti->UsesOverlay () ? GetCustomRailSprite (rti, ti->tile , RTSG_BRIDGE) : rti->base_sprites .bridge_deck ;
1501- if (surface != 0 ) {
1502- if (HasBridgeFlatRamp (ti->tileh , DiagDirToAxis (tunnelbridge_direction))) {
1503- AddSortableSpriteToDraw (surface + ((DiagDirToAxis (tunnelbridge_direction) == AXIS_X) ? RTBO_X : RTBO_Y), PAL_NONE, *ti, {{0 , 0 , TILE_HEIGHT}, {TILE_SIZE, TILE_SIZE, 0 }, {}});
1504- } else {
1505- AddSortableSpriteToDraw (surface + RTBO_SLOPE + tunnelbridge_direction, PAL_NONE, *ti, {{}, {TILE_SIZE, TILE_SIZE, TILE_HEIGHT}, {}});
1500+ if (is_custom_layout || rti->UsesOverlay ()) {
1501+ SpriteID surface = rti->UsesOverlay () ? GetCustomRailSprite (rti, ti->tile , RTSG_BRIDGE) : rti->base_sprites .bridge_deck ;
1502+ if (surface != 0 ) {
1503+ if (HasBridgeFlatRamp (ti->tileh , DiagDirToAxis (tunnelbridge_direction))) {
1504+ AddSortableSpriteToDraw (surface + ((DiagDirToAxis (tunnelbridge_direction) == AXIS_X) ? RTBO_X : RTBO_Y), PAL_NONE, *ti, {{0 , 0 , TILE_HEIGHT}, {TILE_SIZE, TILE_SIZE, 0 }, {}});
1505+ } else {
1506+ AddSortableSpriteToDraw (surface + RTBO_SLOPE + tunnelbridge_direction, PAL_NONE, *ti, {{}, {TILE_SIZE, TILE_SIZE, TILE_HEIGHT}, {}});
1507+ }
15061508 }
15071509 }
15081510
@@ -1673,7 +1675,7 @@ void DrawBridgeMiddle(const TileInfo *ti, BridgePillarFlags blocked_pillars)
16731675 DrawBridgeRoadBits (rampsouth, x, y, bridge_z, axis ^ 1 , false , is_custom_layout);
16741676 } else if (transport_type == TRANSPORT_RAIL) {
16751677 const RailTypeInfo *rti = GetRailTypeInfo (GetRailType (rampsouth));
1676- if (!IsInvisibilitySet (TO_BRIDGES)) {
1678+ if ((is_custom_layout || rti-> UsesOverlay ()) && !IsInvisibilitySet (TO_BRIDGES)) {
16771679 SpriteID surface = rti->UsesOverlay () ? GetCustomRailSprite (rti, rampsouth, RTSG_BRIDGE, TCX_ON_BRIDGE) : rti->base_sprites .bridge_deck ;
16781680 if (surface != 0 ) {
16791681 AddSortableSpriteToDraw (surface + axis, PAL_NONE, x, y, bridge_z, {{}, {TILE_SIZE, TILE_SIZE, 0 }, {}}, IsTransparencySet (TO_BRIDGES));
0 commit comments