aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Zhuravlev <zhuravlevilya@ya.ru>2012-11-23 00:36:52 +0400
committerIlya Zhuravlev <zhuravlevilya@ya.ru>2012-11-23 00:36:52 +0400
commitbbd990f2cca59b9e5775707ba24fbab21a0c6164 (patch)
tree31300749df01a7275d2f620dbe723721de2706f9
parenta0b5605db8ba7f36d868491d2a2274d2bbd8aec5 (diff)
downloadminetest-bbd990f2cca59b9e5775707ba24fbab21a0c6164.tar.gz
minetest-bbd990f2cca59b9e5775707ba24fbab21a0c6164.tar.bz2
minetest-bbd990f2cca59b9e5775707ba24fbab21a0c6164.zip
Fix trees growing into any type of node
-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++;
}