mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 22:22:25 +01:00
Fix logic error in bed rotation
This commit is contained in:
parent
1e237b8d18
commit
9a9df3a42e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user