tree_cmd.c
changeset 3977 edb5b94e2094
parent 3933 a5f08e17f4a0
child 4157 0c3210247472
--- a/tree_cmd.c	Wed Jun 07 18:41:58 2006 +0000
+++ b/tree_cmd.c	Wed Jun 07 19:35:21 2006 +0000
@@ -2,7 +2,6 @@
 
 #include "stdafx.h"
 #include "openttd.h"
-#include "bridge_map.h"
 #include "clear_map.h"
 #include "table/strings.h"
 #include "table/sprites.h"
@@ -69,7 +68,6 @@
 
 		if (dist <= 13 &&
 				IsTileType(cur_tile, MP_CLEAR) &&
-				!IsBridgeAbove(cur_tile) &&
 				!IsClearGround(cur_tile, CLEAR_FIELDS) &&
 				!IsClearGround(cur_tile, CLEAR_ROCKS)) {
 			PlaceTree(cur_tile, r);
@@ -94,7 +92,6 @@
 		uint32 r = Random();
 		TileIndex tile = RandomTileSeed(r);
 		if (IsTileType(tile, MP_CLEAR) &&
-				!IsBridgeAbove(tile) &&
 				!IsClearGround(tile, CLEAR_FIELDS) &&
 				!IsClearGround(tile, CLEAR_ROCKS)) {
 			PlaceTree(tile, r);
@@ -108,9 +105,7 @@
 		do {
 			uint32 r = Random();
 			TileIndex tile = RandomTileSeed(r);
-			if (IsTileType(tile, MP_CLEAR) &&
-					!IsBridgeAbove(tile) &&
-					GetTropicZone(tile) == TROPICZONE_RAINFOREST) {
+			if (IsTileType(tile, MP_CLEAR) && GetTropicZone(tile) == TROPICZONE_RAINFOREST) {
 				PlaceTree(tile, r);
 			}
 		} while (--i);
@@ -180,8 +175,7 @@
 					break;
 
 				case MP_CLEAR:
-					if (!IsTileOwner(tile, OWNER_NONE) ||
-							IsBridgeAbove(tile)) {
+					if (!IsTileOwner(tile, OWNER_NONE)) {
 						msg = STR_2804_SITE_UNSUITABLE;
 						continue;
 					}
@@ -486,7 +480,7 @@
 
 						tile += ToTileIndexDiff(_tileloop_trees_dir[Random() & 7]);
 
-						if (!IsTileType(tile, MP_CLEAR) || IsBridgeAbove(tile)) return;
+						if (!IsTileType(tile, MP_CLEAR)) return;
 
 						switch (GetClearGround(tile)) {
 							case CLEAR_GRASS:
@@ -519,7 +513,6 @@
 					case TREE_GROUND_ROUGH: MakeClear(tile, CLEAR_ROUGH, 3); break;
 					default: MakeClear(tile, CLEAR_SNOW, GetTreeDensity(tile)); break;
 				}
-				ClearBridgeMiddle(tile);
 			}
 			break;
 
@@ -542,7 +535,6 @@
 	if (_opt.landscape == LT_DESERT &&
 			(r = Random(), tile = RandomTileSeed(r), GetTropicZone(tile) == TROPICZONE_RAINFOREST) &&
 			IsTileType(tile, MP_CLEAR) &&
-			!IsBridgeAbove(tile) &&
 			(ct = GetClearGround(tile), ct == CLEAR_GRASS || ct == CLEAR_ROUGH) &&
 			(tree = GetRandomTreeType(tile, GB(r, 24, 8))) != TREE_INVALID) {
 		MakeTree(tile, tree, 0, 0, ct == CLEAR_ROUGH ? TREE_GROUND_ROUGH : TREE_GROUND_GRASS, 0);
@@ -555,7 +547,6 @@
 	r = Random();
 	tile = TILE_MASK(r);
 	if (IsTileType(tile, MP_CLEAR) &&
-			!IsBridgeAbove(tile) &&
 			(ct = GetClearGround(tile), ct == CLEAR_GRASS || ct == CLEAR_ROUGH || ct == CLEAR_SNOW) &&
 			(tree = GetRandomTreeType(tile, GB(r, 24, 8))) != TREE_INVALID) {
 		switch (ct) {