tweak feather falling (#150)

changed y_velocity check for player so thart feather falling only works when actually falling and not standing around.
This commit is contained in:
tenplus1 2024-12-12 13:00:26 +00:00 committed by GitHub
parent ab1bec3be8
commit 280165fada
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -444,7 +444,7 @@ minetest.register_globalstep(function(dtime)
local name = player:get_player_name()
if armor.def[name].feather > 0 then
local vel_y = player:get_velocity().y
if vel_y < 0 and vel_y < 3 then
if vel_y < -0.5 then
vel_y = -(vel_y * 0.05)
player:add_velocity({x = 0, y = vel_y, z = 0})
end