diff options
author | rubidium <rubidium@openttd.org> | 2007-05-26 21:34:38 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-26 21:34:38 +0000 |
commit | ac4a26c705160ebf28b1cab53f740f87cbd9c511 (patch) | |
tree | e7a28180f448c0add76c2ccffcac76652edca5c5 | |
parent | 0e07a938b743c809cdb77ddefce4d8ebf0ea2403 (diff) | |
download | openttd-ac4a26c705160ebf28b1cab53f740f87cbd9c511.tar.xz |
(svn r9944) -Fix: tile selection drawn on the wrong height for some road bridges.
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 5 |
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); |