Skip to content

Commit

Permalink
Move allowed rendergroups table
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrb93 authored Oct 28, 2024
1 parent d0f2285 commit e0b97d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lua/entities/starfall_hologram/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions lua/starfall/sflib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0b97d4

Please sign in to comment.