summaryrefslogtreecommitdiff
path: root/town_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-21 20:02:05 +0000
committertron <tron@openttd.org>2006-03-21 20:02:05 +0000
commit820b8ca230b5b0a32e75b8b3f636921f3293363f (patch)
tree3dd764e9709bc9811e7667a7182d82eb843bfa22 /town_cmd.c
parenta1758406976f06bb07c5cb5f95ef2c205c6ad1c2 (diff)
downloadopenttd-820b8ca230b5b0a32e75b8b3f636921f3293363f.tar.xz
(svn r3996) -Fix: Slope and height information returned for some tile types is wrong
This leads to graphical glitches when drawing foundations. This doesn't fix all problems, but at least some of them.
Diffstat (limited to 'town_cmd.c')
-rw-r--r--town_cmd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/town_cmd.c b/town_cmd.c
index 86bf54124..c9eede7c8 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -144,14 +144,12 @@ static void DrawTile_Town(TileInfo *ti)
static uint GetSlopeZ_Town(const TileInfo* ti)
{
- uint z = GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z;
- if (ti->tileh != 0) z = (z & ~7) + 4;
- return (uint16) z;
+ return ti->z + (ti->tileh == 0 ? 0 : 8);
}
static uint GetSlopeTileh_Town(const TileInfo *ti)
{
- return ti->tileh;
+ return 0;
}
static void AnimateTile_Town(TileIndex tile)