mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 15:00:18 +01:00
Tweak beds moving check (#3170)
checking player movement is too sensitive with 0.001 as the value, changing to 0.05 works a lot better especially when 3rd party mods that change player physics are in use.
This commit is contained in:
parent
312a67b40c
commit
f4f365970a
@ -97,7 +97,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Check if player is moving
|
-- Check if player is moving
|
||||||
if vector.length(player:get_velocity()) > 0.001 then
|
if vector.length(player:get_velocity()) > 0.05 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
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user