mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r20422) -Change [FS#3947]: Resolve tracksprites on bridges always using the southern bridgehead as tile.
This commit is contained in:
parent
c2b1c624dd
commit
b6cf38a912
@ -503,14 +503,14 @@ void DrawCatenaryOnBridge(const TileInfo *ti)
|
||||
|
||||
height = GetBridgeHeight(end);
|
||||
|
||||
SpriteID wire_base = GetWireBase(start);
|
||||
SpriteID wire_base = GetWireBase(end);
|
||||
|
||||
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(start);
|
||||
SpriteID pylon_base = GetPylonBase(end);
|
||||
|
||||
/* Finished with wires, draw pylons
|
||||
* every other tile needs a pylon on the northern end */
|
||||
|
@ -346,7 +346,7 @@ struct ResolverObject {
|
||||
uint8 station_size;
|
||||
} generic;
|
||||
struct {
|
||||
TileIndex tile;
|
||||
TileIndex tile; ///< Tracktile. For track on a bridge this is the southern bridgehead.
|
||||
TileContext context; ///< Are we resolving sprites for the upper halftile, or on a bridge?
|
||||
} routes;
|
||||
struct {
|
||||
|
@ -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, ti->tile, RTSG_BRIDGE);
|
||||
SpriteID surface = GetCustomRailSprite(rti, rampsouth, RTSG_BRIDGE);
|
||||
if (surface != 0) {
|
||||
AddSortableSpriteToDraw(surface + axis, PAL_NONE, x, y, 16, 16, 0, bridge_z, IsTransparencySet(TO_BRIDGES));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user