changeset 5085:419df0d3fbf8 draft

(svn r7152) -Feature (FS#396): allow towns to be built on top of trees in the scenario editor.
author rubidium <rubidium@openttd.org>
date Wed, 15 Nov 2006 18:57:00 +0000
parents 8d31f5db06c7
children 32cae40dc734
files town_cmd.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -1020,8 +1020,8 @@
 	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);
 	}