Skip to content

Commit

Permalink
Who thought of calling getOrigin something that should be called EyeP…
Browse files Browse the repository at this point in the history
…os? (#1524)
  • Loading branch information
foul11 authored Sep 25, 2023
1 parent ecd9d92 commit d1e632b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lua/starfall/libs_cl/render.lua
Original file line number Diff line number Diff line change
Expand Up @@ -521,17 +521,24 @@ end


-- ------------------------------------------------------------------ --
--- Returns the origin of the current render context as calculated by calcview.
function render_library.getOrigin()
--- Call EyePos()
-- @return Vector The origin of the current render context as calculated by calcview.
function render_library.getEyePos()
return vwrap(EyePos())
end

--- Returns the angles of the current render context as calculated by calcview.
--- Alias render.getEyePos(). Call EyePos()
-- @return Vector The origin of the current render context as calculated by calcview.
render_library.getOrigin = render_library.getEyePos

--- Call EyeAngles()
-- @return Angle The angles of the current render context as calculated by calcview.
function render_library.getAngles()
return awrap(EyeAngles())
end

--- Returns the normal vector of the current render context as calculated by calcview, similar to render.getAngles.
--- Call EyeVector()
-- @return Vector The normal vector of the current render context as calculated by calcview, similar to render.getAngles.
function render_library.getEye()
return vwrap(EyeVector())
end
Expand Down

0 comments on commit d1e632b

Please sign in to comment.