From 307140b9a462f895210e1f1329ae16376b1e4e7b Mon Sep 17 00:00:00 2001 From: Sumyjkl Date: Fri, 12 Aug 2022 13:03:11 +1000 Subject: [PATCH] still over it --- mods/PLAYER/mcl_playerplus/init.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index d8217ece8..8756846ce 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -289,14 +289,8 @@ minetest.register_globalstep(function(dtime) local is_just_jumped = control.jump and not mcl_playerplus.is_pressing_jump[name] and not elytra.active mcl_playerplus.is_pressing_jump[name] = control.jump if is_just_jumped and not elytra.active then - elytra.speed = clamp(get_overall_velocity(player:get_velocity()), 1, 3) - -- don't let player get too fast by spamming jump - local block_below = minetest.get_node(vector.offset(fly_pos, 0, -0.9, 0)).name - 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 - end + local direction = player:get_look_dir() + elytra.speed = 1 - (direction.y/2 + 0.5) end elytra.active = player:get_inventory():get_stack("armor", 3):get_name() == "mcl_armor:elytra"