Skip to content

Commit

Permalink
Tweak beds moving check (#3170)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tenplus1 authored Dec 12, 2024
1 parent 312a67b commit f4f3659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mods/beds/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
end

-- 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!"))
return false
end
Expand Down

0 comments on commit f4f3659

Please sign in to comment.