summaryrefslogtreecommitdiff
path: root/water_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-16 11:52:21 +0000
committertron <tron@openttd.org>2005-11-16 11:52:21 +0000
commit45186b16010cb979ef9d7e4613fef81690bb6937 (patch)
tree21dd2488322444c1a42a2123ab3a7000b0b141b5 /water_cmd.c
parentc87511026ac04528317045155d5842cd76a66fb6 (diff)
downloadopenttd-45186b16010cb979ef9d7e4613fef81690bb6937.tar.xz
(svn r3194) Don't use FindLandscapeHeightByTile() when it's overkill
Diffstat (limited to 'water_cmd.c')
-rw-r--r--water_cmd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/water_cmd.c b/water_cmd.c
index 3a5c3924e..fcfa4211b 100644
--- a/water_cmd.c
+++ b/water_cmd.c
@@ -39,9 +39,10 @@ static void FloodVehicle(Vehicle *v);
static bool IsClearWaterTile(TileIndex tile)
{
- TileInfo ti;
- FindLandscapeHeightByTile(&ti, tile);
- return (ti.type == MP_WATER && ti.tileh == 0 && ti.map5 == 0);
+ return
+ IsTileType(tile, MP_WATER) &&
+ _m[tile].m5 == 0 &&
+ GetTileSlope(tile, NULL) == 0;
}
/** Build a ship depot.