diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-10-09 15:29:04 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-10-09 15:29:04 +0100 |
commit | 8f02711af43c1b438fea56a270e67985220d394e (patch) | |
tree | f53d3fadd66826f7e209d6a28542c59880f53b80 /init.lua | |
parent | c81191df2ab8b0f6f79692278ca3035779d7913b (diff) |
getpos to get_pos, get_pitch/yaw to get_look_vertical/horizontal
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |