summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-11-15 18:57:00 +0000
committerrubidium <rubidium@openttd.org>2006-11-15 18:57:00 +0000
commit4a986e43d4c6e91fae4404d2c92125e6e8fa6cc2 (patch)
tree82c0e6c08290bc6db4320c904abdce0c6646d35f
parent118f5b796f03667e33eb4cc437089c63005c4d6d (diff)
downloadopenttd-4a986e43d4c6e91fae4404d2c92125e6e8fa6cc2.tar.xz
(svn r7152) -Feature (FS#396): allow towns to be built on top of trees in the scenario editor.
-rw-r--r--town_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/town_cmd.c b/town_cmd.c
index eb80448f1..d9bc799ae 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -1020,8 +1020,8 @@ int32 CmdBuildTown(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (DistanceFromEdge(tile) < 12)
return_cmd_error(STR_0237_TOO_CLOSE_TO_EDGE_OF_MAP);
- // Can only build on clear flat areas.
- if (!IsTileType(tile, MP_CLEAR) || GetTileSlope(tile, NULL) != SLOPE_FLAT) {
+ // Can only build on clear flat areas, possibly with trees.
+ if ((!IsTileType(tile, MP_CLEAR) && !IsTileType(tile, MP_TREES)) || GetTileSlope(tile, NULL) != SLOPE_FLAT) {
return_cmd_error(STR_0239_SITE_UNSUITABLE);
}