diff options
author | frosch <frosch@openttd.org> | 2008-01-31 17:54:13 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-01-31 17:54:13 +0000 |
commit | 23e6411fb7a8a6052093a9910ab7cfdd811ddd7c (patch) | |
tree | fc3e72fdb1e00ec295eee399031a16a5c311b79d /src/newgrf_commons.cpp | |
parent | 90ee6a16ab499135691fc0be395555d69e0c620e (diff) | |
download | openttd-23e6411fb7a8a6052093a9910ab7cfdd811ddd7c.tar.xz |
(svn r12029) -Feature: Allow trees on shore.
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r-- | src/newgrf_commons.cpp | 4 |
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; |