summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-02-05 21:07:24 +0000
committerrubidium <rubidium@openttd.org>2013-02-05 21:07:24 +0000
commit00530f4ccfd6c076b9ca0d4996ce4a185b5a0311 (patch)
tree4d11bdec851125804c08baa0f0e217d3f95ac0b6 /src/water_cmd.cpp
parent6444dc3f53a7fa705d3e3ef6a3b90d29c74e7032 (diff)
downloadopenttd-00530f4ccfd6c076b9ca0d4996ce4a185b5a0311.tar.xz
(svn r24972) -Fix [FS#5258]: do not make overbuilding rivers with canals insanely expensive; there is no real need to fill the river with dirt first, just excavate it a bit and build borders
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 9d099f5dc..6b4f41eb9 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -419,9 +419,11 @@ CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
/* can't make water of water! */
if (IsTileType(tile, MP_WATER) && (!IsTileOwner(tile, OWNER_WATER) || wc == WATER_CLASS_SEA)) continue;
+ bool water = IsWaterTile(tile);
ret = DoCommand(tile, 0, 0, flags | DC_FORCE_CLEAR_TILE, CMD_LANDSCAPE_CLEAR);
if (ret.Failed()) return ret;
- cost.AddCost(ret);
+
+ if (!water) cost.AddCost(ret);
if (flags & DC_EXEC) {
switch (wc) {