diff --git a/gamemode/cl_init.lua b/gamemode/cl_init.lua index b6641e5..20434f2 100644 --- a/gamemode/cl_init.lua +++ b/gamemode/cl_init.lua @@ -12,7 +12,16 @@ if CLIENT then -- Add all core files function Quantum.Client.Load() - local fol = GM.FolderName .. "/gamemode/core/" + local fol = GM.FolderName .. "/gamemode/core/" + + + -- Shared files + local shFiles = file.Find( fol .. "/sh_*.lua", "LUA" ) + for _, file in pairs( shFiles ) do + include( fol .. file ) + end + + Quantum.Shared.Init() -- CLient files local clFiles = file.Find( fol .. "/client/cl_*.lua", "LUA" ) diff --git a/gamemode/init.lua b/gamemode/init.lua index 1a86d27..2c37c86 100644 --- a/gamemode/init.lua +++ b/gamemode/init.lua @@ -21,7 +21,8 @@ if SERVER then -- Shared files local shFiles = file.Find( fol .. "/sh_*.lua", "LUA" ) for _, file in pairs( shFiles ) do - AddCSLuaFile( fol .. file ) + AddCSLuaFile( fol .. file ) + include( fol .. file ) end -- CLient files diff --git a/gamemode/shared.lua b/gamemode/shared.lua index 78a57d9..bf290ad 100644 --- a/gamemode/shared.lua +++ b/gamemode/shared.lua @@ -10,14 +10,4 @@ GM.Author = "AlmTech" GM.Email = "elias@almtech.se" GM.Website = "N/A" -Quantum = {} - -Quantum.Shared = {} -Quantum.Shared.Init = function() - local shFiles = file.Find( fol .. "/sh_*.lua", "LUA" ) - for _, file in pairs( shFiles ) do - include( fol .. file ) - end -end - -Quantum.Shared.Init() \ No newline at end of file +Quantum = {} \ No newline at end of file