mirror of https://github.com/OpenTTD/OpenTTD.git
(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
This commit is contained in:
parent
6444dc3f53
commit
00530f4ccf
|
@ -419,9 +419,11 @@ CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||||
/* can't make water of water! */
|
/* can't make water of water! */
|
||||||
if (IsTileType(tile, MP_WATER) && (!IsTileOwner(tile, OWNER_WATER) || wc == WATER_CLASS_SEA)) continue;
|
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);
|
ret = DoCommand(tile, 0, 0, flags | DC_FORCE_CLEAR_TILE, CMD_LANDSCAPE_CLEAR);
|
||||||
if (ret.Failed()) return ret;
|
if (ret.Failed()) return ret;
|
||||||
cost.AddCost(ret);
|
|
||||||
|
if (!water) cost.AddCost(ret);
|
||||||
|
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
switch (wc) {
|
switch (wc) {
|
||||||
|
|
Loading…
Reference in New Issue