water_cmd.c
changeset 4231 dea6a63dd058
parent 4171 3fadda3afe70
child 4344 5d0e40cd67b9
--- a/water_cmd.c	Sun Aug 06 08:23:19 2006 +0000
+++ b/water_cmd.c	Sun Aug 06 16:32:49 2006 +0000
@@ -479,9 +479,12 @@
 }
 
 
-static uint GetSlopeZ_Water(const TileInfo *ti)
+static uint GetSlopeZ_Water(TileIndex tile, uint x, uint y)
 {
-	return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z;
+	uint z;
+	uint tileh = GetTileSlope(tile, &z);
+
+	return z + GetPartialZ(x & 0xF, y & 0xF, tileh);
 }
 
 static Slope GetSlopeTileh_Water(TileIndex tile, Slope tileh)