summaryrefslogtreecommitdiff
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
commitfba2106536b914f419dd75830f7bcae8fd061d99 (patch)
treee7a28180f448c0add76c2ccffcac76652edca5c5
parent336c9a5cc432fce760d09b44e85577c8b5f1b2a4 (diff)
downloadopenttd-fba2106536b914f419dd75830f7bcae8fd061d99.tar.xz
(svn r9944) -Fix: tile selection drawn on the wrong height for some road bridges.
-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);