mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 22:22:25 +01:00
Check for attachments before attaching player to bed (#2862)
This commit is contained in:
parent
4945f4bf9a
commit
8158926862
@ -102,6 +102,11 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Check if player is attached to an object
|
||||||
|
if player:get_attach() then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
if beds.player[name] then
|
if beds.player[name] then
|
||||||
-- player already in bed, do nothing
|
-- player already in bed, do nothing
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user