summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 048d3bc..7f7da54 100644
--- a/init.lua
+++ b/init.lua
@@ -283,8 +283,8 @@ function minetest.is_protected(pos, digger)
-- flip player when protection violated
if protector.flip then
-- yaw + 180°
- --local yaw = player:get_look_horizontal() + math.pi
- local yaw = player:get_look_yaw() + math.pi
+ local yaw = player:get_look_horizontal() + math.pi
+ --local yaw = player:get_look_yaw() + math.pi
if yaw > 2 * math.pi then
yaw = yaw - 2 * math.pi
@@ -294,11 +294,11 @@ function minetest.is_protected(pos, digger)
player:set_look_yaw(yaw)
-- invert pitch
- --player:set_look_vertical(-player:get_look_vertical())
- player:set_look_pitch(-player:get_look_pitch())
+ player:set_look_vertical(-player:get_look_vertical())
+ --player:set_look_pitch(-player:get_look_pitch())
-- if digging below player, move up to avoid falling through hole
- local pla_pos = player:getpos()
+ local pla_pos = player:get_pos()
if pos.y < pla_pos.y then