From 3998db207c8df185572020c7cc2191be24a89bdf Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Thu, 21 Jul 2016 11:34:25 +0100 Subject: updated to set/get_look_horizontal as well --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 635d0bd..69b34c9 100644 --- a/init.lua +++ b/init.lua @@ -252,13 +252,13 @@ function minetest.is_protected(pos, digger) and player then -- yaw + 180° - local yaw = player:get_look_yaw() + math.pi + local yaw = player:get_look_horizontal() + math.pi if yaw > 2 * math.pi then yaw = yaw - 2 * math.pi end - player:set_look_yaw(yaw) + player:set_look_horizontal(yaw) -- invert pitch player:set_look_vertical(-player:get_look_vertical()) -- cgit v1.2.3