main_gui.c
changeset 2652 e179c95e5464
parent 2643 735ef1e7884b
child 2676 2ba71e034d97
--- a/main_gui.c	Wed Nov 16 11:50:40 2005 +0000
+++ b/main_gui.c	Wed Nov 16 11:52:21 2005 +0000
@@ -1200,11 +1200,9 @@
 
 static void PlaceProc_LightHouse(TileIndex tile)
 {
-	TileInfo ti;
-
-	FindLandscapeHeightByTile(&ti, tile);
-	if (!IsTileType(tile, MP_CLEAR) || IsSteepTileh(ti.tileh))
+	if (!IsTileType(tile, MP_CLEAR) || IsSteepTileh(GetTileSlope(tile, NULL))) {
 		return;
+	}
 
 	ModifyTile(tile, MP_SETTYPE(MP_UNMOVABLE) | MP_MAP5, 1);
 	SndPlayTileFx(SND_1F_SPLAT, tile);
@@ -1212,11 +1210,9 @@
 
 static void PlaceProc_Transmitter(TileIndex tile)
 {
-	TileInfo ti;
-
-	FindLandscapeHeightByTile(&ti, tile);
-	if (!IsTileType(tile, MP_CLEAR) || IsSteepTileh(ti.tileh))
+	if (!IsTileType(tile, MP_CLEAR) || IsSteepTileh(GetTileSlope(tile, NULL))) {
 		return;
+	}
 
 	ModifyTile(tile, MP_SETTYPE(MP_UNMOVABLE) | MP_MAP5, 0);
 	SndPlayTileFx(SND_1F_SPLAT, tile);