prevent player from gaining too much speed by pitching down and spamming jump

This commit is contained in:
Sumyjkl 2022-08-10 13:24:08 +10:00
parent 22d296e898
commit 25491b3882
1 changed files with 2 additions and 2 deletions

View File

@ -283,7 +283,7 @@ minetest.register_globalstep(function(dtime)
local elytra = mcl_playerplus.elytra[player]
if not elytra.active then
elytra.speed = 2
elytra.speed = 0
end
local is_just_jumped = control.jump and not mcl_playerplus.is_pressing_jump[name] and not elytra.active
@ -295,7 +295,7 @@ minetest.register_globalstep(function(dtime)
local block_below2 = minetest.get_node(vector.offset(fly_pos, 0, -1.9, 0)).name
if minetest.registered_nodes[block_below].walkable
or minetest.registered_nodes[block_below2].walkable then
elytra.speed = 1.5
elytra.speed = 1
end
end