Remove unrequired bed_pos if statement

This commit is contained in:
An0n3m0us 2020-01-27 19:15:22 +00:00
parent fb8c42f862
commit 9d197b0e3e

View file

@ -58,14 +58,12 @@ local function lay_down(player, pos, bed_pos, state, skip)
return
end
if bed_pos then
for _, other_pos in pairs(beds.bed_position) do
if vector.distance(bed_pos, other_pos) < 0.1 then
minetest.chat_send_player(name, S("This bed is already occupied!"))
return false
end
end
end
if vector.length(player:get_player_velocity()) > 0.001 then
minetest.chat_send_player(name, S("You have to stop moving before going to bed!"))