Fix crash with vines
This commit is contained in:
parent
95d0757658
commit
163214d264
|
@ -1010,7 +1010,6 @@ minetest.register_node("default:ladder", {
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:vine", {
|
minetest.register_node("default:vine", {
|
||||||
description = "Vine",
|
description = "Vine",
|
||||||
drawtype = "signlike",
|
drawtype = "signlike",
|
||||||
|
@ -1035,22 +1034,20 @@ minetest.register_node("default:vine", {
|
||||||
user:get_inventory():add_item("main", ItemStack(oldnode.name))
|
user:get_inventory():add_item("main", ItemStack(oldnode.name))
|
||||||
end
|
end
|
||||||
local next_find = true
|
local next_find = true
|
||||||
local ptr = 1
|
local down = 1
|
||||||
while next_find == true do
|
while next_find == true do
|
||||||
local pos2 = {x=pos.x, y=pos.y-ptr, z=pos.z}
|
local pos2 = {x = pos.x, y = pos.y - down, z = pos.z}
|
||||||
local node = minetest.env:get_node(pos2)
|
local node = minetest.get_node(pos2)
|
||||||
if node.name == "default:vine" and check_attached_node(pos2, node) == false then
|
if node.name == "default:vine" then
|
||||||
drop_attached_node(pos2)
|
minetest.remove_node(pos2)
|
||||||
nodeupdate(pos2)
|
down = down + 1
|
||||||
ptr = ptr + 1
|
|
||||||
else
|
else
|
||||||
next_find = false
|
next_find = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:cloud", {
|
minetest.register_node("default:cloud", {
|
||||||
description = "Cloud",
|
description = "Cloud",
|
||||||
tiles = {"default_cloud.png"},
|
tiles = {"default_cloud.png"},
|
||||||
|
|
Loading…
Reference in New Issue