summaryrefslogtreecommitdiff
path: root/src/newgrf_commons.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r--src/newgrf_commons.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index d10b45138..b7684612c 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -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 @@ uint32 GetNearbyTileInformation(TileIndex tile)
{
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;