From 07eeae2944c0979209205b45ef2ae8a03b4da434 Mon Sep 17 00:00:00 2001 From: Giov4 Date: Thu, 11 Mar 2021 22:41:20 +0100 Subject: [PATCH] Fixed bouncer dash --- src/weapons/bouncer.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)