mcl_attached: Check if dir is nil
parent
a375548992
commit
98e87fd5db
|
@ -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 New Issue