From 38379b659b71bc28030cd629d4cd1d0d5a1da729 Mon Sep 17 00:00:00 2001 From: march <106459595+marchc1@users.noreply.github.com> Date: Thu, 26 Sep 2024 06:43:59 -0700 Subject: [PATCH] Add render.getViewSetup (#1854) * Add render.getViewSetup * Add this too * oops * Update render.lua * Update render.lua --------- Co-authored-by: thegrb93 --- lua/starfall/libs_cl/render.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/starfall/libs_cl/render.lua b/lua/starfall/libs_cl/render.lua index 2549cb1b8..45996f3b4 100644 --- a/lua/starfall/libs_cl/render.lua +++ b/lua/starfall/libs_cl/render.lua @@ -2287,6 +2287,13 @@ function render_library.getScreenInfo(e) return instance.Sanitize(screen.ScreenInfo) end +--- Returns information about the current view setup. +-- @param boolean? curview If true, returns the current calculated view setup, otherwise returns original player view setup +-- @return table A table describing the current view setup. See https://wiki.facepunch.com/gmod/Structures/ViewSetup for more information. +function render_library.getViewSetup(curview) + return SF.StructWrapper(instance, render.GetViewSetup(curview), "ViewSetup") +end + --- Returns the entity currently being rendered to -- @return Entity Entity of the screen or hud being rendered function render_library.getScreenEntity()