mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 16:39:33 +01:00
prevent player from gaining too much speed by pitching down and spamming jump
This commit is contained in:
parent
22d296e898
commit
25491b3882
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue