# HG changeset patch # User Samu # Date 2020-01-17 19:58:07 # Node ID 6a59e91030f94bca374b9466f817fe9123b615a4 # Parent ca91ecc08a98467a40daef41e88d3cbf280023fd Fix #7944: Demolishing locks built on rivers didn't always restore the river diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -301,7 +301,7 @@ static CommandCost DoBuildLock(TileIndex 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);