diff --git a/lua/acf/core/globals.lua b/lua/acf/core/globals.lua index 8a9e89141..f9995668d 100644 --- a/lua/acf/core/globals.lua +++ b/lua/acf/core/globals.lua @@ -66,6 +66,7 @@ do -- ACF global vars npc_strider = true, npc_dog = true, phys_bone_follower = true, + acf_armor = not ACF.AllowProcArmor, -- Procedural armor filter } -- Ammo diff --git a/lua/acf/core/utilities/traces_sh.lua b/lua/acf/core/utilities/traces_sh.lua index e8e347220..25d70022d 100644 --- a/lua/acf/core/utilities/traces_sh.lua +++ b/lua/acf/core/utilities/traces_sh.lua @@ -56,7 +56,8 @@ do -- ACF.trace util.TraceLine(traceData) - if Output.HitNonWorld and ACF.CheckClips(Output.Entity, Output.HitPos) then + -- Check for clips or to filter this entity + if Output.HitNonWorld and (ACF.CheckClips(Output.Entity, Output.HitPos) or ACF.GlobalFilter[Output.Entity:GetClass()]) then local OldFilter = traceData.filter local Filter = { Output.Entity } diff --git a/lua/acf/damage/explosion_sv.lua b/lua/acf/damage/explosion_sv.lua index b24850f16..8153af42c 100644 --- a/lua/acf/damage/explosion_sv.lua +++ b/lua/acf/damage/explosion_sv.lua @@ -14,6 +14,7 @@ local TraceData = { filter = true, mask = MASK_SOLID, } +local GlobalFilter = ACF.GlobalFilter --- Checks whether an entity can be affected by ACF explosions. -- @param Entity The entity to be checked. @@ -22,6 +23,7 @@ function Damage.isValidTarget(Entity) local Type = ACF.Check(Entity) if not Type then return false end + if GlobalFilter[Entity:GetClass()] then return false end if Entity.Exploding then return false end if Type ~= "Squishy" then return true end