summaryrefslogtreecommitdiff
path: root/industry_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-05-07 07:55:05 +0000
committertron <tron@openttd.org>2006-05-07 07:55:05 +0000
commit5622ad4b5efdba60db4bcfaf03ba358c569064f6 (patch)
treef5113d4060c886372d1bca9edc9098d07a6dc3e0 /industry_cmd.c
parent4f092c8de8e30ce4d29165a7d46dd2203c887722 (diff)
downloadopenttd-5622ad4b5efdba60db4bcfaf03ba358c569064f6.tar.xz
(svn r4765) Add GetTileMaxZ(), which returns the height of the highest corner of a tile, and use it to simplify the code in a few places
Diffstat (limited to 'industry_cmd.c')
-rw-r--r--industry_cmd.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index 1a4c96209..bad47ae6d 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -535,15 +535,11 @@ static void AnimateTile_Industry(TileIndex tile)
static void CreateIndustryEffectSmoke(TileIndex tile)
{
- Slope tileh;
- uint x;
- uint y;
- uint z;
-
- tileh = GetTileSlope(tile, &z);
- x = TileX(tile) * TILE_SIZE;
- y = TileY(tile) * TILE_SIZE;
- CreateEffectVehicle(x + 15, y + 14, z + 59 + (tileh != SLOPE_FLAT ? TILE_HEIGHT : 0), EV_CHIMNEY_SMOKE);
+ uint x = TileX(tile) * TILE_SIZE;
+ uint y = TileY(tile) * TILE_SIZE;
+ uint z = GetTileMaxZ(tile);
+
+ CreateEffectVehicle(x + 15, y + 14, z + 59, EV_CHIMNEY_SMOKE);
}
static void MakeIndustryTileBigger(TileIndex tile)