summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/water_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index d1ab57f34..12195d8dc 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -301,7 +301,7 @@ static CommandCost DoBuildLock(TileIndex tile, DiagDirection dir, DoCommandFlag
if (ret.Failed()) return ret;
/* middle tile */
- WaterClass wc_middle = IsWaterTile(tile) ? GetWaterClass(tile) : WATER_CLASS_CANAL;
+ WaterClass wc_middle = HasTileWaterGround(tile) ? GetWaterClass(tile) : WATER_CLASS_CANAL;
ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (ret.Failed()) return ret;
cost.AddCost(ret);