mirror of
https://repo.or.cz/minetest_orienteering.git
synced 2025-01-10 06:37:30 +01:00
Use new get_look_* functions (0.4.15)
This commit is contained in:
parent
086911f51a
commit
3d552c9337
4
init.lua
4
init.lua
@ -294,8 +294,8 @@ function orienteering.update_hud_displays(player)
|
|||||||
str_pos = ""
|
str_pos = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
local yaw = (player:get_look_yaw()-math.pi/2)*toDegrees
|
local yaw = player:get_look_horizontal()*toDegrees
|
||||||
local pitch = player:get_look_pitch()*toDegrees
|
local pitch = player:get_look_vertical()*toDegrees
|
||||||
if ((compass or gps) and sextant) or quadcorder then
|
if ((compass or gps) and sextant) or quadcorder then
|
||||||
str_angles = S("Yaw: @1°, pitch: @2°", string.format("%.1f", yaw), string.format("%.1f", pitch))
|
str_angles = S("Yaw: @1°, pitch: @2°", string.format("%.1f", yaw), string.format("%.1f", pitch))
|
||||||
elseif compass or gps then
|
elseif compass or gps then
|
||||||
|
Loading…
Reference in New Issue
Block a user