1
0
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:
tenplus1 2024-12-12 15:36:46 +00:00 committed by GitHub
parent 312a67b40c
commit f4f365970a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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