diff options
author | yexo <yexo@openttd.org> | 2010-09-05 14:54:18 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-09-05 14:54:18 +0000 |
commit | 72e2e21cb5f05b0f66f5f1d5a524eb597f5ba3fc (patch) | |
tree | f1eb22c101b0343c90f625851b307cc026b96ca6 | |
parent | 0ab95ba636ea2fb00f8dfbcc35a9916fcc872497 (diff) | |
download | openttd-72e2e21cb5f05b0f66f5f1d5a524eb597f5ba3fc.tar.xz |
(svn r20745) -Fix: don't delete an object when trying to terraform a tile of it with canal under it. If we delete the object the terraforming will still fail due to the canal
-rw-r--r-- | src/object_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index cedec4188..ed68643e7 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -640,6 +640,8 @@ static CommandCost TerraformTile_Object(TileIndex tile, DoCommandFlag flags, uin { ObjectType type = GetObjectType(tile); + if (GetWaterClass(tile) == WATER_CLASS_CANAL) return_cmd_error(STR_ERROR_MUST_DEMOLISH_CANAL_FIRST); + if (type == OBJECT_OWNED_LAND) { /* Owned land remains unsold */ CommandCost ret = CheckTileOwnership(tile); |