summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-07-21 11:34:25 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-07-21 11:34:25 +0100
commit3998db207c8df185572020c7cc2191be24a89bdf (patch)
treeb80c4c6b99a901818a18b434393691328e301968 /init.lua
parent04166fc7e4e45102261594fcb043c0ea8bf182ee (diff)
updated to set/get_look_horizontal as well
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua4
1 files 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())