summaryrefslogtreecommitdiff
path: root/src/tree_map.h
diff options
context:
space:
mode:
authorEddi-z <43699911+Eddi-z@users.noreply.github.com>2019-03-02 18:33:16 +0100
committerPeterN <peter@fuzzle.org>2019-03-02 17:33:16 +0000
commitb242a04c7d530e5d73c809c53ae857455231a4c6 (patch)
treeb2057df1cda905a1e81ff48881b27d8362f578ac /src/tree_map.h
parent780593ae6010adb3e80620cfcac99934330a14ae (diff)
downloadopenttd-b242a04c7d530e5d73c809c53ae857455231a4c6.tar.xz
Fix #7307: Add WaterClass to MP_TREES, set when trees are on coast tiles (#7309)
This allows allows NewGRF object/industry placement rules to treat trees on coast tiles the same as regular bare coast.
Diffstat (limited to 'src/tree_map.h')
-rw-r--r--src/tree_map.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tree_map.h b/src/tree_map.h
index e614099fc..df9fd441c 100644
--- a/src/tree_map.h
+++ b/src/tree_map.h
@@ -13,6 +13,7 @@
#define TREE_MAP_H
#include "tile_map.h"
+#include "water_map.h"
/**
* List of tree types along all landscape types.
@@ -133,6 +134,7 @@ static inline void SetTreeGroundDensity(TileIndex t, TreeGround g, uint d)
assert(IsTileType(t, MP_TREES)); // XXX incomplete
SB(_m[t].m2, 4, 2, d);
SB(_m[t].m2, 6, 3, g);
+ SetWaterClass(t, g == TREE_GROUND_SHORE ? WATER_CLASS_SEA : WATER_CLASS_INVALID);
}
/**