changed get_look_yaw() to get_look_hotizontal()
changed get_look_yaw() to get_look_horizontal()
This commit is contained in:
parent
c5a6e43b86
commit
cdfb09d451
2
init.lua
2
init.lua
@ -106,7 +106,7 @@ end
|
|||||||
local function get_compass_stack(player, stack)
|
local function get_compass_stack(player, stack)
|
||||||
local target = get_destination(player, stack)
|
local target = get_destination(player, stack)
|
||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
local dir = player:get_look_yaw()
|
local dir = player:get_look_horizontal() --changed because get_look_yaw() is decreped
|
||||||
local angle_north = math.deg(math.atan2(target.x - pos.x, target.z - pos.z))
|
local angle_north = math.deg(math.atan2(target.x - pos.x, target.z - pos.z))
|
||||||
if angle_north < 0 then
|
if angle_north < 0 then
|
||||||
angle_north = angle_north + 360
|
angle_north = angle_north + 360
|
||||||
|
Loading…
x
Reference in New Issue
Block a user