From e5263d854e2130ac86364f4feb7e70ad17de26a8 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sat, 27 Feb 2021 15:10:25 +0100 Subject: [PATCH] Localize player_vel_yaw --- mods/PLAYER/mcl_playerplus/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 60eb00c7ef..e12f73fc0f 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -35,8 +35,9 @@ minetest.register_globalstep(function(dtime) local pitch = degrees(player:get_look_vertical()) * -1 local yaw = degrees(player:get_look_horizontal()) * -1 + local player_vel_yaw = 0 + if degrees(minetest.dir_to_yaw(player_velocity)) == 0 then - player_vel_yaw = 0 yaw = 0 else player_vel_yaw = degrees(minetest.dir_to_yaw(player_velocity))