landscape.c
changeset 1193 a4d5c64088f3
parent 1184 7f0ac9482dad
child 1202 7d8b86bd8ba2
--- a/landscape.c	Thu Jan 27 12:52:20 2005 +0000
+++ b/landscape.c	Thu Jan 27 15:30:34 2005 +0000
@@ -80,22 +80,14 @@
 	return h;
 }
 
-void FindLandscapeHeightByTile(TileInfo *ti, uint tile)
+void FindLandscapeHeightByTile(TileInfo *ti, TileIndex tile)
 {
-	if (TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY()) {
-		ti->tileh = 0;
-		ti->type = MP_VOID;
-		ti->tile = 0;
-		ti->map5 = 0;
-		ti->z = 0;
-		return;
-	}
+	assert(tile < MapSize());
 
 	ti->tile = tile;
 	ti->map5 = _map5[tile];
 	ti->type = TileType(tile);
 	ti->tileh = GetTileSlope(tile, &ti->z);
-//	ti->z = min * 8;
 }
 
 /* find the landscape height for the coordinates x y */