summaryrefslogtreecommitdiff
path: root/src/tree_map.h
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2019-03-24 00:12:31 +0000
committerPeterN <peter@fuzzle.org>2019-03-24 15:16:54 +0000
commit76e77aefada54d1a0dbf7e4b7fb12a9c5f3cb838 (patch)
tree832032eeb13e8c8f2c05c736b1bb675adcf2d0ab /src/tree_map.h
parent317f69c1520a3e60335c56d358686609d3decf86 (diff)
downloadopenttd-76e77aefada54d1a0dbf7e4b7fb12a9c5f3cb838.tar.xz
Fix #7400: Water class for tree tiles was not converted for old saves preventing industry creation.
As the information is always available from the tree ground type, unconditionally update the map array for tree tiles.
Diffstat (limited to 'src/tree_map.h')
-rw-r--r--src/tree_map.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tree_map.h b/src/tree_map.h
index df9fd441c..bd1567b54 100644
--- a/src/tree_map.h
+++ b/src/tree_map.h
@@ -277,6 +277,7 @@ static inline void MakeTree(TileIndex t, TreeType type, uint count, uint growth,
{
SetTileType(t, MP_TREES);
SetTileOwner(t, OWNER_NONE);
+ SetWaterClass(t, ground == TREE_GROUND_SHORE ? WATER_CLASS_SEA : WATER_CLASS_INVALID);
_m[t].m2 = ground << 6 | density << 4 | 0;
_m[t].m3 = type;
_m[t].m4 = 0 << 5 | 0 << 2;