Skip to content
Snippets Groups Projects
Commit 68504124 authored by Perttu Ahola's avatar Perttu Ahola
Browse files

Fix leaf decay at borders of the active block area

parent fe315ac1
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,8 @@ minetest.register_abm({
if trunkp then
local n = minetest.env:get_node(trunkp)
local reg = minetest.registered_nodes[n.name]
if reg.groups.tree and reg.groups.tree ~= 0 then
-- Assume ignore is a trunk, to make the thing work at the border of the active area
if n.name == "ignore" or (reg.groups.tree and reg.groups.tree ~= 0) then
--print("cached trunk still exists")
return
end
......@@ -57,7 +58,8 @@ minetest.register_abm({
}
local n = minetest.env:get_node(p)
local reg = minetest.registered_nodes[n.name]
if reg.groups.tree and reg.groups.tree ~= 0 then
-- Assume ignore is a trunk, to make the thing work at the border of the active area
if n.name == "ignore" or (reg.groups.tree and reg.groups.tree ~= 0) then
do_preserve = true
if default.leafdecay_enable_cache then
--print("caching trunk")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment