Merge pull request #9 from kaeza/fix_recursion

Prevent two separate instances of stack overflow.
This commit is contained in:
Bas
2017-01-06 10:39:29 +01:00
committed by GitHub

View File

@ -61,7 +61,6 @@ vines.register_vine = function( name, defs, biome )
end end
}) })
minetest.register_node( vine_name_middle, { minetest.register_node( vine_name_middle, {
description = "Matured "..defs.description, description = "Matured "..defs.description,
walkable = false, walkable = false,
@ -83,7 +82,7 @@ vines.register_vine = function( name, defs, biome )
local bottom = {x=pos.x, y=pos.y-1, z=pos.z} local bottom = {x=pos.x, y=pos.y-1, z=pos.z}
local bottom_node = minetest.get_node( bottom ) local bottom_node = minetest.get_node( bottom )
if minetest.get_item_group( bottom_node.name, "vines") then if minetest.get_item_group( bottom_node.name, "vines") then
minetest.remove_node( bottom ) minetest.after( 0, minetest.remove_node, bottom )
end end
end, end,
after_dig_node = function( pos, node, oldmetadata, user ) after_dig_node = function( pos, node, oldmetadata, user )