changeset 4231 | 2823b3643862 |
parent 4171 | 5c6e60c392c3 |
child 4344 | 7e123fec5b0b |
--- 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)