mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-26 21:03:45 +01:00
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
Block a user