From 00530f4ccfd6c076b9ca0d4996ce4a185b5a0311 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 5 Feb 2013 21:07:24 +0000 Subject: (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 --- src/water_cmd.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3-54-g00ecf