(svn r20748) -Fix: overbuilding an object tile with sea under it with a canal didn't take the cost for clearing the sea into account

This commit is contained in:
yexo
2010-09-05 16:00:36 +00:00
parent 323c526a4d
commit 0e250f2bdf
5 changed files with 15 additions and 6 deletions

View File

@@ -332,7 +332,7 @@ 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;
ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
ret = DoCommand(tile, 0, 0, flags | DC_FORCE_CLEAR_TILE, CMD_LANDSCAPE_CLEAR);
if (ret.Failed()) return ret;
cost.AddCost(ret);