mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-21 23:03:16 -04:00
Remove unrequired bed_pos if statement
This commit is contained in:
parent
fb8c42f862
commit
9d197b0e3e
1 changed files with 4 additions and 6 deletions
|
@ -58,14 +58,12 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if bed_pos then
|
|
||||||
for _, other_pos in pairs(beds.bed_position) do
|
for _, other_pos in pairs(beds.bed_position) do
|
||||||
if vector.distance(bed_pos, other_pos) < 0.1 then
|
if vector.distance(bed_pos, other_pos) < 0.1 then
|
||||||
minetest.chat_send_player(name, S("This bed is already occupied!"))
|
minetest.chat_send_player(name, S("This bed is already occupied!"))
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if vector.length(player:get_player_velocity()) > 0.001 then
|
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!"))
|
minetest.chat_send_player(name, S("You have to stop moving before going to bed!"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue