summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-02-28 06:14:42 +0000
committertron <tron@openttd.org>2006-02-28 06:14:42 +0000
commit673ce4e3e0fe37ee4b2630b1893c3c7e283db388 (patch)
tree171b59261c6472d6252f89944d088464316377e2
parenta21d7523d25a82815ba8f18e344bac68dbd4166e (diff)
downloadopenttd-673ce4e3e0fe37ee4b2630b1893c3c7e283db388.tar.xz
(svn r3683) Get rid of another FindLandscapeHeight()
-rw-r--r--industry_cmd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index 81941b1cd..ed9ed8f66 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -663,9 +663,15 @@ static void AnimateTile_Industry(TileIndex tile)
static void MakeIndustryTileBiggerCase8(TileIndex tile)
{
- TileInfo ti;
- FindLandscapeHeight(&ti, TileX(tile) * 16, TileY(tile) * 16);
- CreateEffectVehicle(ti.x + 15, ti.y + 14, ti.z + 59 + (ti.tileh != 0 ? 8 : 0), EV_CHIMNEY_SMOKE);
+ uint 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 != 0 ? 8 : 0), EV_CHIMNEY_SMOKE);
}
static void MakeIndustryTileBigger(TileIndex tile, byte size)