diff options
author | tron <tron@openttd.org> | 2006-10-28 14:06:40 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-10-28 14:06:40 +0000 |
commit | b88cd60e8587c51d553f8c1f847ca2eda6906a3d (patch) | |
tree | 35c642245922d4607581e33b9970091ed2cfc3fe | |
parent | 9c219888ba02429e94cb58c915c77f2390aaa33e (diff) | |
download | openttd-b88cd60e8587c51d553f8c1f847ca2eda6906a3d.tar.xz |
(svn r6993) -Regression (r5833): Rails/roads on steep slopes incorrectly show a foundation edge if the NE/NW adjacent tile is a steep tile
-rw-r--r-- | landscape.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/landscape.c b/landscape.c index 4926c4e6d..93ce57616 100644 --- a/landscape.c +++ b/landscape.c @@ -183,8 +183,13 @@ static bool HasFoundationNW(TileIndex tile, Slope slope_here, uint z_here) Slope slope = GetFoundationSlope(TILE_ADDXY(tile, 0, -1), &z); return - (z_here + (slope_here & SLOPE_N ? TILE_HEIGHT : 0) > z + (slope & SLOPE_E ? TILE_HEIGHT : 0)) || - (z_here + (slope_here & SLOPE_W ? TILE_HEIGHT : 0) > z + (slope & SLOPE_S ? TILE_HEIGHT : 0)); + ( + z_here + (slope_here & SLOPE_N ? TILE_HEIGHT : 0) + (slope_here == SLOPE_STEEP_N ? TILE_HEIGHT : 0) > + z + (slope & SLOPE_E ? TILE_HEIGHT : 0) + (slope == SLOPE_STEEP_E ? TILE_HEIGHT : 0) + ) || ( + z_here + (slope_here & SLOPE_W ? TILE_HEIGHT : 0) + (slope_here == SLOPE_STEEP_W ? TILE_HEIGHT : 0) > + z + (slope & SLOPE_S ? TILE_HEIGHT : 0) + (slope == SLOPE_STEEP_S ? TILE_HEIGHT : 0) + ); } @@ -194,8 +199,13 @@ static bool HasFoundationNE(TileIndex tile, Slope slope_here, uint z_here) Slope slope = GetFoundationSlope(TILE_ADDXY(tile, -1, 0), &z); return - (z_here + (slope_here & SLOPE_N ? TILE_HEIGHT : 0) > z + (slope & SLOPE_W ? TILE_HEIGHT : 0)) || - (z_here + (slope_here & SLOPE_E ? TILE_HEIGHT : 0) > z + (slope & SLOPE_S ? TILE_HEIGHT : 0)); + ( + z_here + (slope_here & SLOPE_N ? TILE_HEIGHT : 0) + (slope_here == SLOPE_STEEP_N ? TILE_HEIGHT : 0) > + z + (slope & SLOPE_W ? TILE_HEIGHT : 0) + (slope == SLOPE_STEEP_W ? TILE_HEIGHT : 0) + ) || ( + z_here + (slope_here & SLOPE_E ? TILE_HEIGHT : 0) + (slope_here == SLOPE_STEEP_E ? TILE_HEIGHT : 0) > + z + (slope & SLOPE_S ? TILE_HEIGHT : 0) + (slope == SLOPE_STEEP_S ? TILE_HEIGHT : 0) + ); } |