fix gravity not being reset when died after rocketing

This commit is contained in:
Sumyjkl 2022-08-02 21:23:05 +10:00
parent e28c0d311a
commit c80012a14f

@ -333,9 +333,6 @@ minetest.register_globalstep(function(dtime)
glow = 5, glow = 5,
}) })
end end
else
elytra.rocketing = 0
playerphysics.remove_physics_factor(player, "gravity", "mcl_playerplus:elytra")
end end
new_vel = vector.multiply(new_vel, speed_mult) new_vel = vector.multiply(new_vel, speed_mult)
@ -353,6 +350,9 @@ minetest.register_globalstep(function(dtime)
new_vel.y = new_vel.y - (200 / math.max(speed_mult, 2)) * dtime new_vel.y = new_vel.y - (200 / math.max(speed_mult, 2)) * dtime
new_vel.y = new_vel.y - fall_speed * dtime new_vel.y = new_vel.y - fall_speed * dtime
player:add_velocity(new_vel) player:add_velocity(new_vel)
else
elytra.rocketing = 0
playerphysics.remove_physics_factor(player, "gravity", "mcl_playerplus:elytra")
end end
if wielded_def and wielded_def._mcl_toollike_wield then if wielded_def and wielded_def._mcl_toollike_wield then