summaryrefslogtreecommitdiff
path: root/src/terraform_cmd.cpp
diff options
context:
space:
mode:
authorYexo <yexo@openttd.org>2009-01-19 15:06:11 +0000
committerYexo <yexo@openttd.org>2009-01-19 15:06:11 +0000
commit8b04787d09771797520569e7bff9c570bfb26c18 (patch)
tree92978704d808ea4d5ae940118d8f47f1957d0450 /src/terraform_cmd.cpp
parent49e69399a6e8b59a4a0b2b95af7a3801585b7fb9 (diff)
downloadopenttd-8b04787d09771797520569e7bff9c570bfb26c18.tar.xz
(svn r15151) -Fix: tile 0 can now be highlighted as error tile
Diffstat (limited to 'src/terraform_cmd.cpp')
-rw-r--r--src/terraform_cmd.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp
index aa79ac993..25c193299 100644
--- a/src/terraform_cmd.cpp
+++ b/src/terraform_cmd.cpp
@@ -165,10 +165,9 @@ static CommandCost TerraformTileHeight(TerraformerState *ts, TileIndex tile, int
if ((x <= 1) || (y <= 1) || (x >= MapMaxX() - 1) || (y >= MapMaxY() - 1)) {
/*
* Determine a sensible error tile
- * Note: If x and y are both zero this will disable the error tile. (Tile 0 cannot be highlighted :( )
*/
- if ((x == 1) && (y != 0)) x = 0;
- if ((y == 1) && (x != 0)) y = 0;
+ if (x == 1) x = 0;
+ if (y == 1) y = 0;
_terraform_err_tile = TileXY(x, y);
return_cmd_error(STR_0002_TOO_CLOSE_TO_EDGE_OF_MAP);
}