fix for upcoming update

This commit is contained in:
TheOnly8Z 2023-06-22 18:02:01 -05:00
parent bddfcc58c2
commit 5e6060b343
12 changed files with 24 additions and 4 deletions

View File

@ -1,3 +1,5 @@
if CLIENT then return end
net.Receive("arccw_sendconvar", function(len, ply)
local command = net.ReadString()

View File

@ -1,3 +1,5 @@
if CLIENT then return end
hook.Add("OnEntityCreated", "ArcCW_DefaultClip", function(ent)
if !ent.ArcCW then return end

View File

@ -1,3 +1,5 @@
if CLIENT then return end
function ArcCW.DoorBust(ent, vel)
local cvar = GetConVar("arccw_doorbust"):GetInt()
local t = GetConVar("arccw_doorbust_time"):GetFloat()

View File

@ -1,3 +1,5 @@
if CLIENT then return end
ArcCW.ShieldPropPile = {} -- { {Model = NULL, Weapon = NULL} }
local function SV_ArcCW_CollectGarbage()

View File

@ -1,3 +1,5 @@
if CLIENT then return end
if game.SinglePlayer() then
util.AddNetworkString("arccw_sp_lhikanim")

View File

@ -1,3 +1,5 @@
if CLIENT then return end
ArcCW.RandomWeaponCache = {}
hook.Add("PlayerSpawnedNPC", "ArcCW_PlayerSpawnedNPC", function( ply, ent )

View File

@ -1,3 +1,5 @@
if CLIENT then return end
-- We have to do a timer because there is no "PlayerGivenSWEP" or similar
hook.Add("PlayerGiveSWEP", "ArcCW_Autoload", function(ply, class, tbl)
local weptbl = weapons.Get(class)

View File

@ -1,4 +1,4 @@
if game.SinglePlayer() then
if CLIENT or !game.SinglePlayer() then return end
hook.Add("EntityTakeDamage", "ArcCW_ETD", function(npc, dmg)
timer.Simple(0, function()
@ -10,5 +10,3 @@ hook.Add("EntityTakeDamage", "ArcCW_ETD", function(npc, dmg)
end
end)
end)
end

View File

@ -1,3 +1,5 @@
if CLIENT then return end
ArcCW.NPCsCache = ArcCW.NPCsCache or {}
local npcs = ArcCW.NPCsCache

View File

@ -1,3 +1,5 @@
if CLIENT then return end
hook.Add("EntityTakeDamage", "ArcCW_DoAttDMG", function(ent, dmg)
if !ent:IsPlayer() then return end

View File

@ -1,3 +1,5 @@
if CLIENT then return end
hook.Add( "PlayerGiveSWEP", "ArcCW_YearLimiter", function( ply, class, swep )
local wep = weapons.Get(class)

View File

@ -19,6 +19,7 @@ for _, v in pairs(file.Find("arccw/client/*", "LUA")) do
end
end
-- TODO: Remove SP check after upcoming June 2023 update
if SERVER or game.SinglePlayer() then
for _, v in pairs(file.Find("arccw/server/*", "LUA")) do
include("arccw/server/" .. v)
@ -39,6 +40,7 @@ for _, v in pairs(file.Find("arccw/mods/client/*", "LUA")) do
end
end
-- TODO: Remove SP check after upcoming June 2023 update
if SERVER or game.SinglePlayer() then
for _, v in pairs(file.Find("arccw/mods/server/*", "LUA")) do
include("arccw/mods/server/" .. v)