mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
39 lines
922 B
Lua
39 lines
922 B
Lua
--[[
|
|
| This file was obtained through the combined efforts
|
|
| of Madbluntz & Plymouth Antiquarian Society.
|
|
|
|
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
|
| Maloy, DrPepper10 @ RIP, Atle!
|
|
|
|
|
| Visit for more: https://plymouth.thetwilightzone.ru/
|
|
--]]
|
|
|
|
if CLIENT then return end
|
|
|
|
ArcCW.ShieldPropPile = {} -- { {Model = NULL, Weapon = NULL} }
|
|
|
|
local function SV_ArcCW_CollectGarbage()
|
|
local removed = 0
|
|
|
|
local newpile = {}
|
|
|
|
for _, k in pairs(ArcCW.ShieldPropPile) do
|
|
if IsValid(k.Weapon) then
|
|
table.insert(newpile, k)
|
|
|
|
continue
|
|
end
|
|
|
|
SafeRemoveEntity(k.Model)
|
|
|
|
removed = removed + 1
|
|
end
|
|
|
|
ArcCW.ShieldPropPile = newpile
|
|
|
|
if GetConVar("developer"):GetBool() and removed > 0 then
|
|
print("Removed " .. tostring(removed) .. " Shield Models")
|
|
end
|
|
end
|
|
|
|
timer.Create("ArcCW Shield Model Garbage Collector", 5, 0, SV_ArcCW_CollectGarbage) |