Fix logic error in bed rotation

This commit is contained in:
fluxionary 2023-05-20 03:17:43 -07:00 committed by GitHub
parent 1e237b8d18
commit 9a9df3a42e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -115,8 +115,8 @@ function beds.register_bed(name, def)
local dir = minetest.facedir_to_dir(node.param2) local dir = minetest.facedir_to_dir(node.param2)
local p = vector.add(pos, dir) local p = vector.add(pos, dir)
local node2 = minetest.get_node_or_nil(p) local node2 = minetest.get_node_or_nil(p)
if not node2 or not minetest.get_item_group(node2.name, "bed") == 2 or if not node2 or minetest.get_item_group(node2.name, "bed") ~= 2 or
not node.param2 == node2.param2 then node.param2 ~= node2.param2 then
return false return false
end end
if minetest.is_protected(p, user:get_player_name()) then if minetest.is_protected(p, user:get_player_name()) then