mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 18:13:46 +01:00
L-system: Fix leaves cutting through stems
This commit is contained in:
parent
3eb9ff555f
commit
4493d47a51
@ -542,10 +542,13 @@ void tree_trunk_placement(MMVManip &vmanip, v3f p0, TreeDef &tree_definition)
|
|||||||
if (vmanip.m_area.contains(p1) == false)
|
if (vmanip.m_area.contains(p1) == false)
|
||||||
return;
|
return;
|
||||||
u32 vi = vmanip.m_area.index(p1);
|
u32 vi = vmanip.m_area.index(p1);
|
||||||
if (vmanip.m_data[vi].getContent() != CONTENT_AIR
|
content_t current_node = vmanip.m_data[vi].getContent();
|
||||||
&& vmanip.m_data[vi].getContent() != CONTENT_IGNORE)
|
if (current_node != CONTENT_AIR && current_node != CONTENT_IGNORE
|
||||||
|
&& current_node != tree_definition.leavesnode.getContent()
|
||||||
|
&& current_node != tree_definition.leaves2node.getContent()
|
||||||
|
&& current_node != tree_definition.fruitnode.getContent())
|
||||||
return;
|
return;
|
||||||
vmanip.m_data[vmanip.m_area.index(p1)] = tree_definition.trunknode;
|
vmanip.m_data[vi] = tree_definition.trunknode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user