@@ -503,14 +503,14 @@ void DrawCatenaryOnBridge(const TileInfo
height = GetBridgeHeight(end);
SpriteID wire_base = GetWireBase(end);
SpriteID wire_base = GetWireBase(end, TC_ON_BRIDGE);
AddSortableSpriteToDraw(wire_base + sss->image_offset, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,
sss->x_size, sss->y_size, sss->z_size, height + sss->z_offset,
IsTransparencySet(TO_CATENARY)
);
SpriteID pylon_base = GetPylonBase(end);
SpriteID pylon_base = GetPylonBase(end, TC_ON_BRIDGE);
/* Finished with wires, draw pylons
* every other tile needs a pylon on the northern end */
@@ -333,9 +333,13 @@ uint32 GetTerrainType(TileIndex tile, Ti
}
case MP_TUNNELBRIDGE:
/* During map generation the snowstate may not be valid yet, as the tileloop may not have run yet. */
if (_generating_world) goto genworld; // we do not care about foundations here
has_snow = HasTunnelBridgeSnowOrDesert(tile);
if (context == TC_ON_BRIDGE) {
has_snow = (GetBridgeHeight(tile) > GetSnowLine());
} else {
break;
case MP_STATION:
@@ -21,6 +21,7 @@
enum TileContext {
TC_NORMAL, ///< Nothing special.
TC_UPPER_HALFTILE, ///< Querying information about the upper part of a tile with halftile foundation.
TC_ON_BRIDGE, ///< Querying information about stuff on the bridge (via some bridgehead).
};
/**
@@ -1253,7 +1253,7 @@ void DrawBridgeMiddle(const TileInfo *ti
} else if (transport_type == TRANSPORT_RAIL) {
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(rampsouth));
if (rti->UsesOverlay()) {
SpriteID surface = GetCustomRailSprite(rti, rampsouth, RTSG_BRIDGE);
SpriteID surface = GetCustomRailSprite(rti, rampsouth, RTSG_BRIDGE, TC_ON_BRIDGE);
if (surface != 0) {
AddSortableSpriteToDraw(surface + axis, PAL_NONE, x, y, 16, 16, 0, bridge_z, IsTransparencySet(TO_BRIDGES));
Status change: