From af35502e615a0e39a535f839722f39b4bb5686f7 Mon Sep 17 00:00:00 2001 From: upsilon Date: Sun, 8 Jan 2017 15:16:30 +0100 Subject: [PATCH] Use get_look_horizontal instead of deprecated get_look_yaw --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 4452994..f063566 100644 --- a/init.lua +++ b/init.lua @@ -16,7 +16,7 @@ local function shoot_arrow(itemstack, player) local dir = player:get_look_dir() obj:setvelocity({x=dir.x*19, y=dir.y*19, z=dir.z*19}) obj:setacceleration({x=dir.x*-3, y=-10, z=dir.z*-3}) - obj:setyaw(player:get_look_yaw()+math.pi) + obj:setyaw(player:get_look_horizontal()-math.pi/2) minetest.sound_play("throwing_sound", {pos=playerpos, gain = 0.5}) obj:get_luaentity().player = player:get_player_name() return true