src/newgrf_commons.cpp
changeset 8955 8d6bb31af11b
parent 8954 ca1d17502817
child 9007 6fc05c8ecf87
--- a/src/newgrf_commons.cpp	Thu Jan 31 17:46:08 2008 +0000
+++ b/src/newgrf_commons.cpp	Thu Jan 31 17:54:13 2008 +0000
@@ -15,6 +15,7 @@
 #include "tile_map.h"
 #include "station_map.h"
 #include "settings_type.h"
+#include "tree_map.h"
 
 /** Constructor of generic class
  * @param offset end of original data for this entity. i.e: houses = 110
@@ -296,6 +297,9 @@
 {
 	TileType tile_type = GetTileType(tile);
 
+	/* Fake tile type for trees on shore */
+	if (IsTileType(tile, MP_TREES) && GetTreeGround(tile) == TREE_GROUND_SHORE) tile_type = MP_WATER;
+
 	uint z;
 	Slope tileh = GetTileSlope(tile, &z);
 	byte terrain_type = GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;