summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mapgen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp
index 77b133020..782f00b62 100644
--- a/src/mapgen.cpp
+++ b/src/mapgen.cpp
@@ -132,7 +132,8 @@ void make_tree(ManualMapVoxelManipulator &vmanip, v3s16 p0,
for(s16 ii=0; ii<trunk_h; ii++)
{
if(vmanip.m_area.contains(p1))
- vmanip.m_data[vmanip.m_area.index(p1)] = treenode;
+ if(ii == 0 || vmanip.getNodeNoExNoEmerge(p1).getContent() == CONTENT_AIR)
+ vmanip.m_data[vmanip.m_area.index(p1)] = treenode;
p1.Y++;
}