mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 12:31:05 +01:00
mcl_attached: Check if dir is nil
This commit is contained in:
parent
a375548992
commit
98e87fd5db
1 changed files with 10 additions and 8 deletions
|
@ -7,6 +7,7 @@ minetest.check_single_for_falling = function(pos)
|
|||
local node = minetest.get_node(pos)
|
||||
if minetest.get_item_group(node.name, "attached_node_facedir") ~= 0 then
|
||||
local dir = minetest.facedir_to_dir(node.param2)
|
||||
if dir then
|
||||
local cpos = vector.add(pos, dir)
|
||||
local cnode = minetest.get_node(cpos)
|
||||
if minetest.get_item_group(cnode.name, "solid") == 0 then
|
||||
|
@ -18,6 +19,7 @@ minetest.check_single_for_falling = function(pos)
|
|||
ret = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return ret_o or ret
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue