From 4d6685dbfaecdae1d4b6aebde5aa09330b2c316d Mon Sep 17 00:00:00 2001 From: alek13 Date: Sat, 9 Sep 2023 21:29:50 +0300 Subject: [PATCH] Replace deprecated `:get_look_yaw()` calls with new `:get_look_horizontal() + pi/2`. Fixes lord-server/lord#1047 --- classes/ObjectRef/Player.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/ObjectRef/Player.lua b/classes/ObjectRef/Player.lua index 7308455..9cfdf83 100644 --- a/classes/ObjectRef/Player.lua +++ b/classes/ObjectRef/Player.lua @@ -25,6 +25,7 @@ function Player:get_look_dir() end function Player:get_look_vertical() end --- yaw in radians --- * Angle is counter-clockwise from the +z direction. +--- @return number function Player:get_look_horizontal() end --- sets look pitch --- * radians: Angle from looking forward, where positive is downwards. @@ -40,6 +41,7 @@ function Player:get_look_pitch() end --- yaw in radians - Deprecated as broken. Use --- `get_look_horizontal`. --- * Angle is counter-clockwise from the +x direction. +--- @deprecated function Player:get_look_yaw() end --- sets look pitch - Deprecated. Use `set_look_vertical`. function Player:set_look_pitch(radians) end