mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 16:39:33 +01:00
Fix kicking players from bed when it's destroyed
This commit is contained in:
parent
cf46f0d8b8
commit
6fac49550e
1 changed files with 2 additions and 2 deletions
|
@ -88,7 +88,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, other_pos in pairs(mcl_beds.bed_pos) do
|
for _, other_pos in pairs(mcl_beds.bed_pos) do
|
||||||
if vector.distance(bed_pos, other_pos) < 0.1 then
|
if vector.distance(bed_pos2, other_pos) < 0.1 then
|
||||||
return false, S("This bed is already occupied!")
|
return false, S("This bed is already occupied!")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -170,7 +170,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
||||||
|
|
||||||
mcl_beds.player[name] = 1
|
mcl_beds.player[name] = 1
|
||||||
mcl_beds.pos[name] = pos
|
mcl_beds.pos[name] = pos
|
||||||
mcl_beds.bed_pos[name] = bed_pos
|
mcl_beds.bed_pos[name] = bed_pos2
|
||||||
player_in_bed = player_in_bed + 1
|
player_in_bed = player_in_bed + 1
|
||||||
-- physics, eye_offset, etc
|
-- physics, eye_offset, etc
|
||||||
player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0})
|
player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0})
|
||||||
|
|
Loading…
Reference in a new issue