forked from VoxeLibre/VoxeLibre
Add warning about bed velocity
This commit is contained in:
parent
7d1f8ac314
commit
0cc179acc6
|
@ -83,6 +83,9 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- No sleeping while moving. Slightly different behaviour than in MC.
|
-- No sleeping while moving. Slightly different behaviour than in MC.
|
||||||
|
-- FIXME: Velocity threshold should be 0.01 but Minetest 5.3.0
|
||||||
|
-- sometimes reports incorrect Y speed. A velocity threshold
|
||||||
|
-- of 0.125 still seems good enough.
|
||||||
if vector.length(player:get_player_velocity()) > 0.125 then
|
if vector.length(player:get_player_velocity()) > 0.125 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!"))
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue