Leafdecay: Use param2 ~= 1 instead of param2 == 0
authorleucome <leucome@hotmail.com>
Thu, 19 Sep 2019 01:13:18 +0000 (21:13 -0400)
committerParamat <paramat@users.noreply.github.com>
Thu, 19 Sep 2019 01:13:18 +0000 (02:13 +0100)
mods/default/functions.lua

index 2a4fdfeb199b626dfc8f86c61a4116c2ddfc5ec4..9d6c593728a795c825b1489a751f29e825b7c404 100644 (file)
@@ -427,7 +427,7 @@ local function leafdecay_after_destruct(pos, oldnode, def)
                        vector.add(pos, def.radius), def.leaves)) do
                local node = minetest.get_node(v)
                local timer = minetest.get_node_timer(v)
-               if node.param2 == 0 and not timer:is_started() then
+               if node.param2 ~= 1 and not timer:is_started() then
                        timer:start(math.random(20, 120) / 10)
                end
        end