diff --git a/src/weapons/bouncer.lua b/src/weapons/bouncer.lua index 3b237e2..d915505 100644 --- a/src/weapons/bouncer.lua +++ b/src/weapons/bouncer.lua @@ -71,10 +71,9 @@ function dash(player, energy) end local dir = player:get_look_dir() + local look_horizontal = player:get_look_horizontal() local rotate_factor = player:get_player_control().left and 1.57 or -1.57 - local dash_dir = vector.rotate_around_axis(dir, {x=0,y=1,z=0}, rotate_factor) - - dash_dir.y = 0 + local dash_dir = vector.rotate_around_axis(minetest.yaw_to_dir(look_horizontal), {x=0,y=1,z=0}, rotate_factor) player:add_velocity(vector.multiply(dash_dir, 20)) block_league.sound_play("bl_sword_dash", p_name)