summaryrefslogtreecommitdiff
path: root/landscape.c
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-08-14 10:05:27 +0000
committerdominik <dominik@openttd.org>2004-08-14 10:05:27 +0000
commitb3cdae2af1c6c8e33d0a506d33694e4c6b8f679f (patch)
tree1f473e55b57bac82ebabe3c01c33a0c51576de39 /landscape.c
parentb7e14169f8c08e6d0b2921ea08738f09df6c3180 (diff)
downloadopenttd-b3cdae2af1c6c8e33d0a506d33694e4c6b8f679f.tar.xz
(svn r51) Yet another slope graphics fix
Diffstat (limited to 'landscape.c')
-rw-r--r--landscape.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/landscape.c b/landscape.c
index 1932d29e2..45e371bb2 100644
--- a/landscape.c
+++ b/landscape.c
@@ -246,14 +246,17 @@ bool hasFoundation(TileInfo *ti, bool direction)
{
bool south, other; // southern corner and east/west corner
uint slope = _tile_type_procs[ti->type]->get_slope_tileh_proc(ti);
- south = ((ti->tileh) & 2) != (slope & 2);
+ uint tileh = ti->tileh;
+
+ if(slope==0 && slope!=tileh) tileh=15;
+ south = (tileh & 2) != (slope & 2);
if(direction)
- other = ((ti->tileh) & 4) != (slope & 4);
+ other = (tileh & 4) != (slope & 4);
else
- other = ((ti->tileh) & 1) != (slope & 1);
-
+ other = (tileh & 1) != (slope & 1);
return south || other;
+
}
void DrawFoundation(TileInfo *ti, uint f)