From e0b97d43bdc117c3cc7498ef61aef3d619139ca5 Mon Sep 17 00:00:00 2001 From: thegrb93 Date: Mon, 28 Oct 2024 15:17:09 -0400 Subject: [PATCH] Move allowed rendergroups table --- lua/entities/starfall_hologram/cl_init.lua | 8 -------- lua/starfall/sflib.lua | 9 +++++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lua/entities/starfall_hologram/cl_init.lua b/lua/entities/starfall_hologram/cl_init.lua index 96482de5c..df487a364 100644 --- a/lua/entities/starfall_hologram/cl_init.lua +++ b/lua/entities/starfall_hologram/cl_init.lua @@ -129,14 +129,6 @@ function ENT:OnCullModeChanged() self.renderstack:makeDirty() end -SF.allowedRenderGroups = { - [RENDERGROUP_OPAQUE]=true, - [RENDERGROUP_TRANSLUCENT]=true, - [RENDERGROUP_BOTH]=true, - [RENDERGROUP_VIEWMODEL]=true, - [RENDERGROUP_VIEWMODEL_TRANSLUCENT]=true, - [RENDERGROUP_OPAQUE_BRUSH]=true, -} function ENT:OnRenderGroupChanged(name, old, group) if not SF.allowedRenderGroups[group] then return end if group == -1 then diff --git a/lua/starfall/sflib.lua b/lua/starfall/sflib.lua index 65bf74031..b7aff5f5b 100644 --- a/lua/starfall/sflib.lua +++ b/lua/starfall/sflib.lua @@ -1518,6 +1518,15 @@ local materialBlacklist = { ["debug/debugluxels"] = true, ["effects/ar2_altfire1"] = true, } +SF.allowedRenderGroups = { + [RENDERGROUP_OPAQUE]=true, + [RENDERGROUP_TRANSLUCENT]=true, + [RENDERGROUP_BOTH]=true, + [RENDERGROUP_VIEWMODEL]=true, + [RENDERGROUP_VIEWMODEL_TRANSLUCENT]=true, + [RENDERGROUP_OPAQUE_BRUSH]=true, +} + --- Checks that the material isn't malicious -- @param Material The path to the material -- @return The material object or false if it's invalid