Check for attachments before attaching player to bed (#2862)

This commit is contained in:
ElCeejo 2021-05-08 02:30:57 -07:00 committed by GitHub
parent 4945f4bf9a
commit 8158926862
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -102,6 +102,11 @@ local function lay_down(player, pos, bed_pos, state, skip)
return false
end
-- Check if player is attached to an object
if player:get_attach() then
return false
end
if beds.player[name] then
-- player already in bed, do nothing
return false