summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-26 21:34:38 +0000
committerrubidium <rubidium@openttd.org>2007-05-26 21:34:38 +0000
commitac4a26c705160ebf28b1cab53f740f87cbd9c511 (patch)
treee7a28180f448c0add76c2ccffcac76652edca5c5 /src
parent0e07a938b743c809cdb77ddefce4d8ebf0ea2403 (diff)
downloadopenttd-ac4a26c705160ebf28b1cab53f740f87cbd9c511.tar.xz
(svn r9944) -Fix: tile selection drawn on the wrong height for some road bridges.
Diffstat (limited to 'src')
-rw-r--r--src/tunnelbridge_cmd.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 8c2ee05cd..96a00160a 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -995,13 +995,14 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
if (HASBIT(rts, ROADTYPE_TRAM)) {
uint offset = GetBridgeRampDirection(ti->tile);
+ uint z = ti->z;
if (ti->tileh != SLOPE_FLAT) {
offset = (offset + 1) & 1;
- ti->z += TILE_HEIGHT;
+ z += TILE_HEIGHT;
} else {
offset += 2;
}
- DrawBridgeTramBits(ti->x, ti->y, ti->z, offset, HASBIT(rts, ROADTYPE_ROAD));
+ DrawBridgeTramBits(ti->x, ti->y, z, offset, HASBIT(rts, ROADTYPE_ROAD));
}
} else if (GetRailType(ti->tile) == RAILTYPE_ELECTRIC) {
DrawCatenary(ti);