Mercurial > hg > openttd
changeset 16052:31ffe6e4f1e5 draft
(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
author | yexo <yexo@openttd.org> |
---|---|
date | Sun, 05 Sep 2010 14:54:18 +0000 |
parents | fa9a88329064 |
children | 0cdc65a036de |
files | src/object_cmd.cpp |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -640,6 +640,8 @@ { 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);