mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r26111) -Fix: theoretical case where sprite table could be overread for aqueducts that start at flat land
This commit is contained in:
parent
c2ee87c1a9
commit
b53da6a6f5
@ -1223,10 +1223,9 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||
/* HACK Wizardry to convert the bridge ramp direction into a sprite offset */
|
||||
base_offset += (6 - tunnelbridge_direction) % 4;
|
||||
|
||||
if (ti->tileh == SLOPE_FLAT) base_offset += 4; // sloped bridge head
|
||||
|
||||
/* Table number BRIDGE_PIECE_HEAD always refers to the bridge heads for any bridge type */
|
||||
if (transport_type != TRANSPORT_WATER) {
|
||||
if (ti->tileh == SLOPE_FLAT) base_offset += 4; // sloped bridge head
|
||||
psid = &GetBridgeSpriteTable(GetBridgeType(ti->tile), BRIDGE_PIECE_HEAD)[base_offset];
|
||||
} else {
|
||||
psid = _aqueduct_sprites + base_offset;
|
||||
|
Loading…
Reference in New Issue
Block a user