1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-07-26 05:48:54 +01:00

(svn r10699) -Fix (r10698): bridge middle parts were drawn too high if the southern bridge head has a foundation.

This commit is contained in:
rubidium 2007-07-26 18:36:32 +00:00
parent d624f66c79
commit 205e700b26

View File

@ -44,11 +44,11 @@ uint GetBridgeHeight(TileIndex t)
{ {
uint h; uint h;
Slope tileh = GetTileSlope(t, &h); Slope tileh = GetTileSlope(t, &h);
uint f = GetBridgeFoundation(tileh, DiagDirToAxis(GetBridgeRampDirection(t))); Foundation f = GetBridgeFoundation(tileh, DiagDirToAxis(GetBridgeRampDirection(t)));
/* one height level extra if the ramp is on a flat foundation */ /* one height level extra if the ramp is on a flat foundation */
return return
h + TILE_HEIGHT + h + TILE_HEIGHT +
(IS_INT_INSIDE(f, 1, 15) ? TILE_HEIGHT : 0) + (IsLeveledFoundation(f) ? TILE_HEIGHT : 0) +
(IsSteepSlope(tileh) ? TILE_HEIGHT : 0); (IsSteepSlope(tileh) ? TILE_HEIGHT : 0);
} }