Compare commits

..

No commits in common. "60c7a152722af51fcd2aaa56a1065000210047db" and "79d9b040f34ed1fe901a188ea9fdc3e4c049ba70" have entirely different histories.

13 changed files with 158 additions and 508 deletions

View File

@ -29,7 +29,7 @@ else
if ent:IsValid() then if ent:IsValid() then
ent:SetPredictable( false ) ent:SetPredictable( false )
print("[prediction] cl stop:", ent) print("CL Stopping prediction on", ent)
end end
end) end)
end end
@ -73,7 +73,7 @@ function ENT:Think()
net.Start("Benny_ItemSlept") net.Start("Benny_ItemSlept")
net.WriteEntity(self) net.WriteEntity(self)
net.Broadcast() net.Broadcast()
print("[prediction] sv stop:", self) print("SV Stopping prediction on", self)
--self:SetCollisionGroup( COLLISION_GROUP_WEAPON ) --self:SetCollisionGroup( COLLISION_GROUP_WEAPON )
self.BAsleep = true self.BAsleep = true
end end

View File

@ -109,9 +109,10 @@ else
local ent = net.ReadEntity() local ent = net.ReadEntity()
if ent:IsValid() then if ent:IsValid() then
ent:SetPredictable( net.ReadBool() ) ent:SetPredictable( net.ReadBool() )
print("[prediction] cl prediction start:", ent) print("Starting prediction on", ent)
else else
print("[prediction] cl tried to predict invalid ent") print("Tried to make an ent predictable but it wasn't valid.")
debug.Trace()
end end
end) end)
end end
@ -121,13 +122,14 @@ function SWEP:EquipItem( ent )
if CLIENT then print("FUCK OFF") debug.Trace() return end if CLIENT then print("FUCK OFF") debug.Trace() return end
if IsValid(ent) and ent.BennyItem then if IsValid(ent) and ent.BennyItem then
if ent:GetOwner() != NULL then if ent:GetOwner() != NULL then
print( "[equip]", ent, "belongs to", ent:GetOwner(), "not equipping" ) print( ent, "belongs to", ent:GetOwner(), "!! Not equipping." )
return
elseif p:GetInventory()[ent] then
print( "[equip]", ent, "already belongs to", p )
return return
end end
print("[equip]", ent) if p:GetInventory()[ent] then
print( ent, "is in", p, "'s inventory!" )
return
end
print("Pick up", ent)
self:SetDesireR( ent ) self:SetDesireR( ent )
@ -160,7 +162,7 @@ function SWEP:DropItem()
local p = self:GetOwner() local p = self:GetOwner()
local ent = self:GetActiveR() local ent = self:GetActiveR()
if ent:IsValid() then if ent:IsValid() then
if CLIENT then print("[drop] DropItem called on cl not allowed") return end if CLIENT then print("DropItem called on CLIENT but certain things aren't finished yet.") return end
self:SetDesireR( NULL ) self:SetDesireR( NULL )

View File

@ -3,13 +3,13 @@
-- Your Name is Benny -- Your Name is Benny
--------------------- ---------------------
BENNY.AddConvar( "cam_f", -75 ) local cam_f = CreateConVar( "b-cam_f", -75 )
BENNY.AddConvar( "cam_r", 12 ) local cam_r = CreateConVar( "b-cam_r", 12 )
BENNY.AddConvar( "cam_u", 12 ) local cam_u = CreateConVar( "b-cam_u", 12 )
BENNY.AddConvar( "cam_fov", 75 ) local cam_fov = CreateConVar( "b-cam_fov", 75 )
BENNY.AddConvar( "cam_fp", 0 ) local cam_fp = CreateConVar( "b-cam_fp", 0 )
BENNY.AddConvar( "cam_fp_fov", 75 ) local cam_fp_fov = CreateConVar( "b-cam_fp_fov", 75 )
local lastfp local lastfp
local m = 3 local m = 3
@ -24,13 +24,13 @@ function CamSpot( ang, pos )
local f, r, u = TPSOverride:Forward(), TPSOverride:Right(), TPSOverride:Up() local f, r, u = TPSOverride:Forward(), TPSOverride:Right(), TPSOverride:Up()
local tr = { local tr = {
start = pos, start = pos,
endpos = pos + (f*c_cam_f:GetFloat()) + (r*c_cam_r:GetFloat()) + (u*c_cam_u:GetFloat()), endpos = pos + (f*cam_f:GetFloat()) + (r*cam_r:GetFloat()) + (u*cam_u:GetFloat()),
filter = LocalPlayer(), -- ply, filter = LocalPlayer(), -- ply,
mins = m1, mins = m1,
maxs = m2, maxs = m2,
} }
if c_cam_fp:GetBool() then if cam_fp:GetBool() then
tr.endpos = LocalPlayer():EyePos() tr.endpos = EyePos()
end end
tr = util.TraceHull(tr) tr = util.TraceHull(tr)
return tr.HitPos return tr.HitPos
@ -49,9 +49,9 @@ function QConvert( fovDegrees )
end end
function GM:PreDrawViewModels() function GM:PreDrawViewModels()
local fp = c_cam_fp:GetBool() local fp = cam_fp:GetBool()
if fp then if fp then
cam.Start3D( nil, nil, QConvert( c_cam_fp_fov:GetFloat() ) ) cam.Start3D( nil, nil, QConvert( cam_fp_fov:GetFloat() ) )
cam.IgnoreZ( true ) cam.IgnoreZ( true )
local p = LocalPlayer() local p = LocalPlayer()
p.IWantDraw = true p.IWantDraw = true
@ -67,7 +67,7 @@ function GM:PreDrawViewModels()
end end
function GM:PrePlayerDraw( ply, flags ) function GM:PrePlayerDraw( ply, flags )
local fp = c_cam_fp:GetBool() local fp = cam_fp:GetBool()
if fp and ply == LocalPlayer() and !ply.IWantDraw then if fp and ply == LocalPlayer() and !ply.IWantDraw then
return true return true
end end
@ -77,16 +77,15 @@ function GM:CalcView( ply, pos, ang, fov )
local view = { local view = {
origin = CamSpot(TPSOverride), -- pos includes the smoothstair offset which looks stupid here origin = CamSpot(TPSOverride), -- pos includes the smoothstair offset which looks stupid here
angles = TPSOverride, angles = TPSOverride,
fov = c_cam_fov:GetFloat(), fov = cam_fov:GetFloat(),
drawviewer = true drawviewer = true
} }
local fp = c_cam_fp:GetBool() local fp = cam_fp:GetBool()
if fp then if fp then
ply:SetupBones() ply:SetupBones()
local bm = ply:GetBoneMatrix(ply:LookupBone("DEF-spine.003")) local bm = ply:GetBoneMatrix(ply:LookupBone("DEF-spine.006"))
view.origin = bm:GetTranslation() view.origin = bm:GetTranslation()
view.origin:Add( vector_up*10 )
if ply:GetLayerSequence( GESTURE_SLOT_JUMP ) == ply:LookupSequence("dive_end_handgun") then if ply:GetLayerSequence( GESTURE_SLOT_JUMP ) == ply:LookupSequence("dive_end_handgun") then
local progress = ply:GetLayerCycle( GESTURE_SLOT_JUMP ) local progress = ply:GetLayerCycle( GESTURE_SLOT_JUMP )
@ -146,7 +145,7 @@ hook.Add( "OnRequestFullUpdate", "Benny_OnRequestFullUpdate_CameraFP", function(
if CLIENT then if CLIENT then
local ply = LocalPlayer() local ply = LocalPlayer()
if !ply:IsValid() then return end if !ply:IsValid() then return end
local fp = c_cam_fp:GetBool() local fp = cam_fp:GetBool()
if lastfp == nil then lastfp = !fp end if lastfp == nil then lastfp = !fp end
timer.Simple( 0, function() timer.Simple( 0, function()
if !fp then if !fp then

View File

@ -3,14 +3,15 @@
-- Your Name is Benny -- Your Name is Benny
--------------------- ---------------------
function BENNY.AddConvar( name, value, flags, mins, maxs ) Convars = {}
local CV = CreateConVar( "b-" .. name, value, flags, l8( "#Convar." .. name .. ".Description" ), mins, maxs )
_G["c_" .. name] = CV Convars.List = {}
-- print( "Created Convar: " .. name .. " : " .. l8( "#Convar." .. name .. ".Name" ) .. " : " .. l8( "#Convar." .. name .. ".Description" ) )
return CV function Convars:Add( name, def, help, mins, max )
end end
function BENNY.AddClientConvar( name, value, flags, mins, maxs ) function Convars:GetVector()
if SERVER then return end local exploded = string.Explode( " ", "" )
return BENNY.AddConvar( name, value, flags, mins, maxs ) return Vector()
end end

View File

@ -5,20 +5,20 @@ BennyGame = BennyGame or {}
BG_GTYPE_CAMPAIGN = 0 BG_GTYPE_CAMPAIGN = 0
BG_GTYPE_MP = 1 BG_GTYPE_MP = 1
BENNY.AddConvar("gametype", 1) local cGametype = CreateConVar("b-gametype", 1, nil, "0 for Campaign, 1 for MP")
BENNY.AddConvar("gamemode", "dom") local cGamemode = CreateConVar("b-gamemode", "dom", nil, "")
BENNY.AddConvar("g_minplayers", 2) local cMinplayers = CreateConVar("b-g_minplayers", 2)
BENNY.AddConvar("g_pregame", 15) local cPregame = CreateConVar("b-g_pregame", 15)
BENNY.AddConvar("g_postgame", 15) local cPostgame = CreateConVar("b-g_postgame", 15)
BENNY.AddConvar("g_intermission", 10) local cIntermission = CreateConVar("b-g_intermission", 10)
function BennyGame:GetType() function BennyGame:GetType()
return c_gametype:GetBool() and BG_GTYPE_MP or BG_GTYPE_CAMPAIGN return cGametype:GetBool() and BG_GTYPE_MP or BG_GTYPE_CAMPAIGN
end end
function BennyGame:GetMode() function BennyGame:GetMode()
return c_gamemode:GetString() return cGamemode:GetString()
end end
function BennyGame:GetModeData() function BennyGame:GetModeData()
@ -45,52 +45,52 @@ BennyGame.Gamemodes = {
name = "#Gamemode.tdm.Name", name = "#Gamemode.tdm.Name",
description = "#Gamemode.tdm.Description", description = "#Gamemode.tdm.Description",
scorelimit = BENNY.AddConvar("g_tdm_scorelimit", 75 ), scorelimit = CreateConVar("b-g_tdm_scorelimit", 75 ),
timelimit = BENNY.AddConvar("g_tdm_timelimit", 10*60 ), timelimit = CreateConVar("b-g_tdm_timelimit", 10*60 ),
}, },
["ffa"] = { ["ffa"] = {
name = "#Gamemode.ffa.Name", name = "#Gamemode.ffa.Name",
description = "#Gamemode.ffa.Description", description = "#Gamemode.ffa.Description",
scorelimit = BENNY.AddConvar("g_ffa_scorelimit", 30 ), scorelimit = CreateConVar("b-g_ffa_scorelimit", 30 ),
timelimit = BENNY.AddConvar("g_ffa_timelimit", 10*60 ), timelimit = CreateConVar("b-g_ffa_timelimit", 10*60 ),
}, },
["snd"] = { ["snd"] = {
name = "#Gamemode.snd.Name", name = "#Gamemode.snd.Name",
description = "#Gamemode.snd.Description", description = "#Gamemode.snd.Description",
scorelimit = BENNY.AddConvar("g_snd_scorelimit", 6 ), scorelimit = CreateConVar("b-g_snd_scorelimit", 6 ),
timelimit = BENNY.AddConvar("g_snd_timelimit", 2.5*60 ), timelimit = CreateConVar("b-g_snd_timelimit", 2.5*60 ),
}, },
["ctf"] = { ["ctf"] = {
name = "#Gamemode.ctf.Name", name = "#Gamemode.ctf.Name",
description = "#Gamemode.ctf.Description", description = "#Gamemode.ctf.Description",
scorelimit = BENNY.AddConvar("g_ctf_scorelimit", 3 ), scorelimit = CreateConVar("b-g_ctf_scorelimit", 3 ),
timelimit = BENNY.AddConvar("g_ctf_timelimit", 10*60 ), timelimit = CreateConVar("b-g_ctf_timelimit", 10*60 ),
}, },
["dom"] = { ["dom"] = {
name = "#Gamemode.dom.Name", name = "#Gamemode.dom.Name",
description = "#Gamemode.dom.Description", description = "#Gamemode.dom.Description",
scorelimit = BENNY.AddConvar("g_dom_scorelimit", 1000 ), scorelimit = CreateConVar("b-g_dom_scorelimit", 1000 ),
timelimit = BENNY.AddConvar("g_dom_timelimit", 10*60 ), timelimit = CreateConVar("b-g_dom_timelimit", 10*60 ),
roundlimit = BENNY.AddConvar("g_dom_roundlimit", 1 ), roundlimit = CreateConVar("b-g_dom_roundlimit", 1 ),
}, },
["dem"] = { ["dem"] = {
name = "#Gamemode.dem.Name", name = "#Gamemode.dem.Name",
description = "#Gamemode.dem.Description", description = "#Gamemode.dem.Description",
scorelimit = BENNY.AddConvar("g_dem_scorelimit", 3 ), scorelimit = CreateConVar("b-g_dem_scorelimit", 3 ),
timelimit = BENNY.AddConvar("g_dem_timelimit", 5*60 ), timelimit = CreateConVar("b-g_dem_timelimit", 5*60 ),
roundlimit = BENNY.AddConvar("g_dom_roundlimit", 2 ), roundlimit = CreateConVar("b-g_dom_roundlimit", 2 ),
}, },
["hp"] = { ["hp"] = {
name = "#Gamemode.hp.Name", name = "#Gamemode.hp.Name",
description = "#Gamemode.hp.Description", description = "#Gamemode.hp.Description",
scorelimit = BENNY.AddConvar("g_hp_scorelimit", 300 ), scorelimit = CreateConVar("b-g_hp_scorelimit", 300 ),
timelimit = BENNY.AddConvar("g_hp_timelimit", 10*60 ), timelimit = CreateConVar("b-g_hp_timelimit", 10*60 ),
}, },
} }
@ -159,7 +159,6 @@ hook.Add("InitPostEntity", "Benny_Gamestate_InitPostEntity", function()
BennyGame:Accessor( "Round", "Int", 1 ) BennyGame:Accessor( "Round", "Int", 1 )
BennyGame:Accessor( "SwappedAtRound", "Int", 1 ) BennyGame:Accessor( "SwappedAtRound", "Int", 1 )
BennyGame:Accessor( "TimeExtension", "Int", 0 ) BennyGame:Accessor( "TimeExtension", "Int", 0 )
BennyGame:Accessor( "UUID", "Int", 0 )
BennyGame:Accessor( "Team1_Score", "Int", 0 ) BennyGame:Accessor( "Team1_Score", "Int", 0 )
BennyGame:Accessor( "Team2_Score", "Int", 0 ) BennyGame:Accessor( "Team2_Score", "Int", 0 )
@ -169,10 +168,6 @@ hook.Add("InitPostEntity", "Benny_Gamestate_InitPostEntity", function()
BennyGame:Accessor( "Team6_Score", "Int", 0 ) BennyGame:Accessor( "Team6_Score", "Int", 0 )
BennyGame:Accessor( "TeamsSwapped", "Bool", false ) BennyGame:Accessor( "TeamsSwapped", "Bool", false )
if SERVER then
BennyGame:SetUUID( math.random( -(2^31), (2^31)-1 ) )
end
end) end)
function BennyGame:GetScoreLimit() function BennyGame:GetScoreLimit()
@ -192,15 +187,15 @@ end
function BennyGame:GetPregameTime() function BennyGame:GetPregameTime()
return c_g_pregame:GetInt() return cPregame:GetInt()
end end
function BennyGame:GetPostgameTime() function BennyGame:GetPostgameTime()
return c_g_postgame:GetInt() return cPostgame:GetInt()
end end
function BennyGame:GetIntermissionTime() function BennyGame:GetIntermissionTime()
return c_g_intermission:GetInt() return cIntermission:GetInt()
end end
function BennyGame:GetScoreForTeam( teamid ) function BennyGame:GetScoreForTeam( teamid )
@ -275,7 +270,7 @@ function BennyGame:EndRound( reason, forceteam )
else else
TheFull = TheFull .. l8(TEAMS[winningteam].name) .. " wins! " TheFull = TheFull .. l8(TEAMS[winningteam].name) .. " wins! "
end end
TheFull = TheFull .. c_g_postgame:GetInt() .. "s until the next round." TheFull = TheFull .. cPostgame:GetInt() .. "s until the next round."
PrintMessage(HUD_PRINTCENTER, TheFull) PrintMessage(HUD_PRINTCENTER, TheFull)
local roundtime = CurTime() - BennyGame:GetRoundStartedAt() local roundtime = CurTime() - BennyGame:GetRoundStartedAt()
@ -352,11 +347,11 @@ hook.Add("Think", "Benny_Gamestate_Think", function()
count = count + 1 count = count + 1
end end
if count >= c_g_minplayers:GetInt() then if count >= cMinplayers:GetInt() then
roundstate = BG_STATE_PRE roundstate = BG_STATE_PRE
BennyGame:SetState( roundstate ) BennyGame:SetState( roundstate )
BennyGame:SetPregameStartedAt( CurTime() ) BennyGame:SetPregameStartedAt( CurTime() )
PrintMessage(HUD_PRINTCENTER, "Pregame. " .. c_g_pregame:GetInt() .. "s until the round starts") PrintMessage(HUD_PRINTCENTER, "Pregame. " .. cPregame:GetInt() .. "s until the round starts")
end end
end end
@ -390,9 +385,4 @@ hook.Add("Think", "Benny_Gamestate_Think", function()
end end
end end
end) end)
-- Map functions
function BennyGame:GetMapName()
return "SixT"
end

View File

@ -283,11 +283,7 @@ function GM:HUDPaint()
if BennyGame:GetType() == BG_GTYPE_CAMPAIGN then if BennyGame:GetType() == BG_GTYPE_CAMPAIGN then
CURRCHAR = "benny" CURRCHAR = "benny"
else else
if TEAMS[myteam] then CURRCHAR = TEAMS[myteam].factionid
CURRCHAR = TEAMS[myteam].factionid
else
CURRCHAR = "unassigned"
end
end end
local COLOR_MAIN = FACTIONS[CURRCHAR].COLOR_MAIN local COLOR_MAIN = FACTIONS[CURRCHAR].COLOR_MAIN
local COLOR_DARK = FACTIONS[CURRCHAR].COLOR_DARK local COLOR_DARK = FACTIONS[CURRCHAR].COLOR_DARK
@ -812,15 +808,8 @@ local things = {
local function QuickDrawStat( wide, data, first ) local function QuickDrawStat( wide, data, first )
local gap = 0 local gap = 0
local teamd local teamd = TEAMS[data.id]
local faction local faction = FACTIONS[teamd.factionid]
if TEAMS[data.id] then
teamd = TEAMS[data.id]
faction = FACTIONS[teamd.factionid]
else
teamd = TEAMS[0]
faction = FACTIONS[teamd.factionid]
end
local TeamName = l8( teamd.name ) local TeamName = l8( teamd.name )
hTextQ( TeamName, "HUD_36", 0, 0, faction.COLOR_MAIN, nil, nil, faction.COLOR_DARK ) hTextQ( TeamName, "HUD_36", 0, 0, faction.COLOR_MAIN, nil, nil, faction.COLOR_DARK )
@ -892,11 +881,7 @@ function GM:HUDDrawScoreBoard()
if BennyGame:GetType() == BG_GTYPE_CAMPAIGN then if BennyGame:GetType() == BG_GTYPE_CAMPAIGN then
CURRCHAR = "benny" CURRCHAR = "benny"
else else
if TEAMS[myteam] then CURRCHAR = TEAMS[myteam].factionid
CURRCHAR = TEAMS[myteam].factionid
else
CURRCHAR = "unassigned"
end
end end
local COLOR_MAIN = FACTIONS[CURRCHAR].COLOR_MAIN local COLOR_MAIN = FACTIONS[CURRCHAR].COLOR_MAIN
local COLOR_DARK = FACTIONS[CURRCHAR].COLOR_DARK local COLOR_DARK = FACTIONS[CURRCHAR].COLOR_DARK

View File

@ -57,7 +57,7 @@ InventoryMeta.__index = InventoryMeta
function PT:GetInventory() function PT:GetInventory()
if !self.Inventory then if !self.Inventory then
print("[inventory] new inventory created: ", self) print("Creating new inventory for", self)
self.Inventory = {} self.Inventory = {}
self.Inventory[0] = { Owner = self } self.Inventory[0] = { Owner = self }
setmetatable( self.Inventory, InventoryMeta ) setmetatable( self.Inventory, InventoryMeta )
@ -65,7 +65,7 @@ function PT:GetInventory()
if SERVER then if SERVER then
for i, v in pairs( self:GetChildren() ) do for i, v in pairs( self:GetChildren() ) do
if v.AEItem then if v.AEItem then
print( "[inventory] regen: adding", v) print( "Regen, adding", v, "to inventory")
self.Inventory[v] = true self.Inventory[v] = true
end end
end end
@ -78,15 +78,15 @@ function PT:GetInventory()
return self.Inventory return self.Inventory
end end
gameevent.Listen( "OnRequestFullUpdate" ) gameevent.Listen( "OnRequestFullUpdate" )
hook.Add( "OnRequestFullUpdate", "Benny_OnRequestFullUpdate_Inventory", function( data ) hook.Add( "OnRequestFullUpdate", "OnRequestFullUpdate_example", function( data )
local name = data.name // Same as Player:Nick() local name = data.name // Same as Player:Nick()
local steamid = data.networkid // Same as Player:SteamID() local steamid = data.networkid // Same as Player:SteamID()
local id = data.userid // Same as Player:UserID() local id = data.userid // Same as Player:UserID()
local index = data.index // Same as Entity:EntIndex() minus one local index = data.index // Same as Entity:EntIndex() minus one
if SERVER then if SERVER then
print("[inventory]", Player(id), "FullUpdate resync")
Player(id):GetInventory():Sync() Player(id):GetInventory():Sync()
end end
end ) end )
@ -95,7 +95,7 @@ if SERVER then
util.AddNetworkString("AEINV_InvSync") util.AddNetworkString("AEINV_InvSync")
else else
net.Receive("AEINV_InvSync", function() net.Receive("AEINV_InvSync", function()
print("[inventory] sync start:") print("Destroyed old inventory")
local p = LocalPlayer() local p = LocalPlayer()
p.Inventory = nil p.Inventory = nil
if p.GetInventory then if p.GetInventory then
@ -103,13 +103,12 @@ else
local count = net.ReadUInt(8) local count = net.ReadUInt(8)
for i=1, count do for i=1, count do
local key = net.ReadEntity() local key = net.ReadEntity()
print( "\tadded", key) print( "Added", key)
inv[key] = true inv[key] = true
end end
else else
print("\ti don't have an inventory, maybe you asked too early!!") print("Asked for inventory too early!!")
end end
print("\tsync done")
end) end)
end end

View File

@ -222,17 +222,13 @@ AddItem( "base_firearm", {
BaseClass.Think( class, ent, handler ) BaseClass.Think( class, ent, handler )
end, end,
["EntThink"] = function( class, ent ) ["EntThink"] = function( class, ent, handler )
if IsValid(ent:GetOwner()) then return end -- Only run this stuff when there's no owner in hand if IsValid(handler) then return end
if CLIENT then return end
local Firedown = ((ent.ShootTime or 0) >= CurTime())
if Firedown then class:Attack( ent ) end
local InProcess = ent:GetBurstCount() > 0 local InProcess = ent:GetBurstCount() > 0
local Topped = ent:GetBurstCount() == class.BurstCount local Topped = ent:GetBurstCount() == class.BurstCount
local Runaway = class.BurstRunaway local Runaway = class.BurstRunaway
local BAuto = class.BurstAuto local BAuto = class.BurstAuto
local Firedown = false
if Runaway and InProcess and !Topped then if Runaway and InProcess and !Topped then
class:Attack( ent, handler ) class:Attack( ent, handler )
else else
@ -247,6 +243,10 @@ AddItem( "base_firearm", {
ent:SetDelayBurst( CurTime() + class.BurstDelay ) ent:SetDelayBurst( CurTime() + class.BurstDelay )
end end
end end
if ent:GetRefillTime() != 0 and ent:GetRefillTime() <= CurTime() then
ent:SetClip( class.ClipSize )
ent:SetRefillTime( 0 )
end
end, end,
["Attack"] = function( class, ent, handler ) ["Attack"] = function( class, ent, handler )
@ -266,7 +266,6 @@ AddItem( "base_firearm", {
ent:SetDelayBurst( CurTime() + class.BurstDelay ) ent:SetDelayBurst( CurTime() + class.BurstDelay )
if BAuto then if BAuto then
ent:SetBurstCount( 0 ) ent:SetBurstCount( 0 )
ent.ShootTime = 0
end end
end end
@ -378,7 +377,7 @@ AddItem( "base_firearm", {
["EntPhysicsCollide"] = function( class, ent, data, collider ) ["EntPhysicsCollide"] = function( class, ent, data, collider )
if ( data.DeltaTime > 0.1 and data.Speed > 200 ) then if ( data.DeltaTime > 0.1 and data.Speed > 200 ) then
ent.ShootTime = CurTime() + math.Rand( 0.1, 0.5 ) class:Attack( ent )
end end
end, end,
@ -633,8 +632,8 @@ do -- Handguns
}) })
AddItem( "cz75", { AddItem( "cz75", {
PrintName = "#Item.cz75.Name", PrintName = "CZ-75",
Description = "#Item.cz75.Description", Description = "9mm handgun",
Category = "pistol", Category = "pistol",
Base = "base_firearm", Base = "base_firearm",
@ -661,8 +660,8 @@ do -- Handguns
}) })
AddItem( "g18", { AddItem( "g18", {
PrintName = "#Item.g18.Name", PrintName = "G18",
Description = "#Item.g18.Description", Description = "automatic 9mm handgun",
Category = "pistol", Category = "pistol",
Base = "base_firearm", Base = "base_firearm",
@ -981,7 +980,7 @@ do -- Shotguns
ClipSize = 8, ClipSize = 8,
Pellets = 8, Pellets = 8,
Delay = 0.22, Delay = 0.4,
BurstCount = 1, BurstCount = 1,
FireSound = { FireSound = {
"benny/weapons/spas12/01.ogg", "benny/weapons/spas12/01.ogg",

View File

@ -6,8 +6,7 @@
Languages = {} Languages = {}
function l8( inp ) function l8( inp )
if inp[1] == "#" then inp = inp:Right(-2) else return "Untranslatable: '" .. inp .. "'" end return Languages["en-us"][inp] or Languages["en-us"][inp] or inp
return Languages["en-us"][inp] or Languages["en-us"][inp] or ("No translation: '" .. inp .. "'")
end end
local AD, IN = AddCSLuaFile, include local AD, IN = AddCSLuaFile, include

View File

@ -3,222 +3,85 @@ local L = {}
Languages["en-us"] = L Languages["en-us"] = L
L["Name"] = "English (United States)" L["Name"] = "English (United States)"
-- Convars
L["Convar.cam_f.Name"] = "Camera Forward Offset"
L["Convar.cam_f.Description"] = ""
L["Convar.cam_fov.Name"] = "Camera FOV"
L["Convar.cam_fov.Description"] = "Field-of-view of the camera, horizontally, in 4:3 (further in higher aspect-ratios)"
L["Convar.cam_fp.Name"] = "First-person Mode"
L["Convar.cam_fp.Description"] = "First-person perspective"
L["Convar.cam_fp_fov.Name"] = "First-person weapon FOV"
L["Convar.cam_fp_fov.Description"] = "How close objects in the player's hand will appear"
L["Convar.cam_r.Name"] = "Camera Right Offset"
L["Convar.cam_r.Description"] = ""
L["Convar.cam_u.Name"] = "Camera Up Offset"
L["Convar.cam_u.Description"] = ""
L["Convar.cheat_endround.Name"] = "Cheat: End Round"
L["Convar.cheat_endround.Description"] = "Cheat"
L["Convar.cheat_rewardxp.Name"] = "Cheat: Reward XP"
L["Convar.cheat_rewardxp.Description"] = "Cheat"
L["Convar.cheat_setxp.Name"] = "Cheat: Set XP"
L["Convar.cheat_setxp.Description"] = "Cheat"
L["Convar.cheat_scoreadd.Name"] = "Cheat: Add Score"
L["Convar.cheat_scoreadd.Description"] = "Cheat"
L["Convar.cheat_scoreset.Name"] = "Cheat: Set Score"
L["Convar.cheat_scoreset.Description"] = "Cheat"
L["Convar.cheat_setstate.Name"] = "Cheat: Set Game State"
L["Convar.cheat_setstate.Description"] = "Cheat"
L["Convar.cheat_setteam.Name"] = "Cheat: Set Team"
L["Convar.cheat_setteam.Description"] = "Cheat"
L["Convar.debug_listbones.Name"] = "debug_listbones"
L["Convar.debug_listbones.Description"] = "List all bones of the current character"
L["Convar.g_intermission.Name"] = "g_intermission"
L["Convar.g_intermission.Description"] = "Intermission time"
L["Convar.g_minplayers.Name"] = "g_minplayers"
L["Convar.g_minplayers.Description"] = "Minimal players necessary to start the game"
L["Convar.g_pregame.Name"] = "g_pregame"
L["Convar.g_pregame.Description"] = "Pre-game time"
L["Convar.g_postgame.Name"] = "g_postgame"
L["Convar.g_postgame.Description"] = "Post-game time"
L["Convar.g_snd_scorelimit.Name"] = "g_snd_scorelimit"
L["Convar.g_snd_scorelimit.Description"] = "Search and Destroy: Score Limit"
L["Convar.g_snd_timelimit.Name"] = "g_snd_timelimit"
L["Convar.g_snd_timelimit.Description"] = "Search and Destroy: Time Limit"
L["Convar.g_tdm_scorelimit.Name"] = "g_tdm_scorelimit"
L["Convar.g_tdm_scorelimit.Description"] = "Team Deathmatch: Score Limit"
L["Convar.g_tdm_timelimit.Name"] = "g_tdm_timelimit"
L["Convar.g_tdm_timelimit.Description"] = "Team Deathmatch: Time Limit"
L["Convar.g_ctf_scorelimit.Name"] = "g_ctf_scorelimit"
L["Convar.g_ctf_scorelimit.Description"] = "Capture the Flag: Score Limit"
L["Convar.g_ctf_timelimit.Name"] = "g_ctf_timelimit"
L["Convar.g_ctf_timelimit.Description"] = "Capture the Flag: Time Limit"
L["Convar.g_dem_scorelimit.Name"] = "g_dem_scorelimit"
L["Convar.g_dem_scorelimit.Description"] = "Demolition: Score Limit"
L["Convar.g_dem_timelimit.Name"] = "g_dem_timelimit"
L["Convar.g_dem_timelimit.Description"] = "Demolition: Time Limit"
L["Convar.g_dom_roundlimit.Name"] = "g_dom_roundlimit"
L["Convar.g_dom_roundlimit.Description"] = "Domination: Round Limit"
L["Convar.g_dom_scorelimit.Name"] = "g_dom_scorelimit"
L["Convar.g_dom_scorelimit.Description"] = "Domination: Score Limit"
L["Convar.g_dom_timelimit.Name"] = "g_dom_timelimit"
L["Convar.g_dom_timelimit.Description"] = "Domination: Time Limit"
L["Convar.g_ffa_scorelimit.Name"] = "g_ffa_scorelimit"
L["Convar.g_ffa_scorelimit.Description"] = "Free For All: Score Limit"
L["Convar.g_ffa_timelimit.Name"] = "g_ffa_timelimit"
L["Convar.g_ffa_timelimit.Description"] = "Free For All: Time Limit"
L["Convar.g_hp_scorelimit.Name"] = "g_hp_scorelimit"
L["Convar.g_hp_scorelimit.Description"] = "Hardpoint: Score Limit"
L["Convar.g_hp_timelimit.Name"] = "g_hp_timelimit"
L["Convar.g_hp_timelimit.Description"] = "Hardpoint: Time Limit"
L["Convar.gamemode.Name"] = "Gamemode"
L["Convar.gamemode.Description"] = "Game mode"
L["Convar.gametype.Name"] = "Gametype"
L["Convar.gametype.Description"] = "Game type: SP or MP"
-- Gamemodes
L["Gamemode.free.Name"] = "Freeplay"
L["Gamemode.free.Description"] = "Objectiveless free-roam."
L["Gamemode.tdm.Name"] = "Team Deathmatch"
L["Gamemode.tdm.Description"] = "Several teams fight to the death for the most kills."
L["Gamemode.ffa.Name"] = "Free-for-all"
L["Gamemode.ffa.Description"] = "Every man for himself."
L["Gamemode.snd.Name"] = "Search and Destroy"
L["Gamemode.snd.Description"] = "One half tries to plant a bomb while the other half attempts to stop it."
L["Gamemode.ctf.Name"] = "Capture the Flag"
L["Gamemode.ctf.Description"] = "Bring your enemies flags to your base."
L["Gamemode.dom.Name"] = "Domination"
L["Gamemode.dom.Description"] = "Several teams fight to hold capture points for the longest amount of time"
L["Gamemode.dem.Name"] = "Demolition"
L["Gamemode.dem.Description"] = "One half tries to destroy the other halves objectives."
L["Gamemode.hp.Name"] = "Hardpoint"
L["Gamemode.hp.Description"] = "Several teams fight to hold a singular capture point for the longest amount of time."
-- Teams -- Teams
L["Team.cia.Name"] = "CIA" L["#Team.cia.Name"] = "CIA"
L["Team.cia.Description"] = "CIA black ops, coverup crew" L["#Team.cia.Description"] = "CIA black ops, coverup crew"
L["Team.halo.Name"] = "HALO" L["#Team.halo.Name"] = "HALO"
L["Team.halo.Description"] = "Assassination agency?" L["#Team.halo.Description"] = "Assassination agency?"
L["Team.plasof.Name"] = "PLASOF" L["#Team.plasof.Name"] = "PLASOF"
L["Team.plasof.Description"] = "People's Liberation Army Special Operations Forces" L["#Team.plasof.Description"] = "People's Liberation Army Special Operations Forces"
L["Team.arng.Name"] = "NATIONAL GUARD" L["#Team.arng.Name"] = "NATIONAL GUARD"
L["Team.arng.Description"] = "United States National Guard" L["#Team.arng.Description"] = "United States National Guard"
L["Team.militia.Name"] = "MILITIA" L["#Team.militia.Name"] = "MILITIA"
L["Team.militia.Description"] = "Brazilian militia??? what" L["#Team.militia.Description"] = "Brazilian militia??? what"
L["Team.viper.Name"] = "VIPERS" L["#Team.viper.Name"] = "VIPERS"
L["Team.viper.Description"] = "Gang" L["#Team.viper.Description"] = "Gang"
-- Items -- Items
L["Item.mk23.Name"] = "MK.23" L["#Item.mk23.Name"] = "MK.23"
L["Item.mk23.Description"] = "Special forces sidearm" L["#Item.mk23.Description"] = "Special forces sidearm"
L["Item.cz75.Name"] = "CZ-75" L["#Item.fnc.Name"] = "FNC Para"
L["Item.cz75.Description"] = "Rugged semi-automatic handgun" L["#Item.fnc.Description"] = "Imported assault rifle"
L["Item.g18.Name"] = "G18" L["#Item.qbz.Name"] = "QBZ-95"
L["Item.g18.Description"] = "Automatic machine pistol" L["#Item.qbz.Description"] = "Low-profile bullpup assault rifle"
L["Item.fnc.Name"] = "FNC Para" L["#Item.qbb.Name"] = "QBB-LSW"
L["Item.fnc.Description"] = "Imported assault rifle" L["#Item.qbb.Description"] = "Bullpup machine gun"
L["Item.qbz.Name"] = "QBZ-95" L["#Item.stoner.Name"] = "STONER-63"
L["Item.qbz.Description"] = "Low-profile bullpup assault rifle" L["#Item.stoner.Description"] = "Modular machine gun"
L["Item.qbb.Name"] = "QBB-LSW" L["#Item.hk21.Name"] = "HK-21"
L["Item.qbb.Description"] = "Bullpup machine gun" L["#Item.hk21.Description"] = "Powerful medium machine gun"
L["Item.stoner.Name"] = "STONER-63" L["#Item.m16a2.Name"] = "M16A2"
L["Item.stoner.Description"] = "Modular machine gun" L["#Item.m16a2.Description"] = "Rugged burst rifle"
L["Item.hk21.Name"] = "HK-21" L["#Item.oicw.Name"] = "OICW"
L["Item.hk21.Description"] = "Powerful medium machine gun" L["#Item.oicw.Description"] = "Advanced combat rifle"
L["Item.m16a2.Name"] = "M16A2" L["#Item.spas12.Name"] = "SPAS-12"
L["Item.m16a2.Description"] = "Rugged burst rifle" L["#Item.spas12.Description"] = "Chrome-lined autoshotgun"
L["Item.oicw.Name"] = "OICW" L["#Item.tmp.Name"] = "TMP"
L["Item.oicw.Description"] = "Advanced combat rifle" L["#Item.tmp.Description"] = "Concealable machine pistol"
L["Item.spas12.Name"] = "SPAS-12" L["#Item.mp5k.Name"] = "MP5K"
L["Item.spas12.Description"] = "Chrome-lined autoshotgun" L["#Item.mp5k.Description"] = "High-quality SMG"
L["Item.tmp.Name"] = "TMP" L["#Item.mp7.Name"] = "MP7"
L["Item.tmp.Description"] = "Concealable machine pistol" L["#Item.mp7.Description"] = "Special forces PDW"
L["Item.mp5k.Name"] = "MP5K" L["#Item.mac11.Name"] = "MAC-11"
L["Item.mp5k.Description"] = "High-quality SMG" L["#Item.mac11.Description"] = "Tiny hornet gun"
L["Item.mp7.Name"] = "MP7" L["#Item.1887.Name"] = "1887"
L["Item.mp7.Description"] = "Special forces PDW" L["#Item.1887.Description"] = "Lever-action"
L["Item.mac11.Name"] = "MAC-11" L["#Item.db.Name"] = "DB"
L["Item.mac11.Description"] = "Tiny hornet gun" L["#Item.db.Description"] = "Side-by-side shotgun"
L["Item.1887.Name"] = "1887" L["#Item.aa12.Name"] = "AA-12"
L["Item.1887.Description"] = "Lever-action" L["#Item.aa12.Description"] = "Automatic combat shotgun"
L["Item.db.Name"] = "DB" L["#Item.striker.Name"] = "Streetsweeper"
L["Item.db.Description"] = "Side-by-side shotgun" L["#Item.striker.Description"] = "Semi-automatic drum-fed shotgun"
L["Item.aa12.Name"] = "AA-12" L["#Item.r870.Name"] = "R870"
L["Item.aa12.Description"] = "Automatic combat shotgun" L["#Item.r870.Description"] = "Sawn-off pump-action shotgun"
L["Item.striker.Name"] = "Streetsweeper" L["#Item.spas15.Name"] = "SPAS-15"
L["Item.striker.Description"] = "Semi-automatic drum-fed shotgun" L["#Item.spas15.Description"] = "Mag-fed pump-action shotgun"
L["Item.r870.Name"] = "R870" L["#Item.satchels.Name"] = "Satchels"
L["Item.r870.Description"] = "Sawn-off pump-action shotgun" L["#Item.satchels.Description"] = "Packs of bombs and a detonator"
L["Item.spas15.Name"] = "SPAS-15" L["#Item.toolgun.Name"] = "Tool gun"
L["Item.spas15.Description"] = "Mag-fed pump-action shotgun" L["#Item.toolgun.Description"] = "Developer tools"
L["Item.satchels.Name"] = "Satchels"
L["Item.satchels.Description"] = "Packs of bombs and a detonator"
L["Item.toolgun.Name"] = "Tool gun"
L["Item.toolgun.Description"] = "Developer tools"

View File

@ -14,12 +14,12 @@ local settings = {
{ {
name = "Camera", name = "Camera",
items = { items = {
{ type = TYPE_NUMBER, cvar = "cam_f", min = -200, max = 200 }, { type = TYPE_NUMBER, cvar = "b-cam_f", min = -200, max = 200, name = "Camera Forward" },
{ type = TYPE_NUMBER, cvar = "cam_r", min = -30, max = 30 }, { type = TYPE_NUMBER, cvar = "b-cam_r", min = -30, max = 30, name = "Camera Right" },
{ type = TYPE_NUMBER, cvar = "cam_u", min = -30, max = 30 }, { type = TYPE_NUMBER, cvar = "b-cam_u", min = -30, max = 30, name = "Camera Up" },
{ type = TYPE_NUMBER, cvar = "cam_fov", min = 30, max = 120 }, { type = TYPE_NUMBER, cvar = "b-cam_fov", min = 30, max = 120, name = "Camera FOV" },
{ type = TYPE_BOOL, cvar = "cam_fp" }, { type = TYPE_BOOL, cvar = "b-cam_fp", name = "First-person Mode" },
{ type = TYPE_NUMBER, cvar = "cam_fp_fov", min = 30, max = 120 }, { type = TYPE_NUMBER, cvar = "b-cam_fp_fov", min = 30, max = 120, name = "FP weapon FOV" },
} }
}, },
{ {
@ -80,17 +80,17 @@ local entries = {
SP:AddItem(Cat) SP:AddItem(Cat)
for index, data in ipairs( data.items ) do for index, data in ipairs( data.items ) do
if !data.cvarpointer then data.cvarpointer = GetConVar("b-" .. data.cvar) end if !data.cvarpointer then data.cvarpointer = GetConVar(data.cvar) end
if data.type == TYPE_BOOL then if data.type == TYPE_BOOL then
local Changer = vgui.Create("DCheckBoxLabel", Cat) local Changer = vgui.Create("DCheckBoxLabel", Cat)
Changer:Dock( TOP ) Changer:Dock( TOP )
Changer:SetConVar( "b-" .. data.cvar ) Changer:SetConVar( data.cvar )
Changer:SetText( l8( "#Convar." .. data.cvar .. ".Name" ) ) Changer:SetText( data.name )
elseif data.type == TYPE_NUMBER then elseif data.type == TYPE_NUMBER then
local Changer = vgui.Create("DNumSlider", Cat) local Changer = vgui.Create("DNumSlider", Cat)
Changer:Dock( TOP ) Changer:Dock( TOP )
Changer:SetConVar( "b-" .. data.cvar ) Changer:SetConVar( data.cvar )
Changer:SetText( l8( "#Convar." .. data.cvar .. ".Name" ) ) Changer:SetText( data.name )
Changer:SetMin( data.min ) Changer:SetMin( data.min )
Changer:SetMax( data.max ) Changer:SetMax( data.max )
Changer:SetDecimals( 0 ) Changer:SetDecimals( 0 )

View File

@ -1,177 +0,0 @@
if SERVER then return end
if util.IsBinaryModuleInstalled("gdiscord") then
require("gdiscord")
local RPC_AppID = "1287531216630976603"
function DiscordUpdate()
local rpc_data = {}
rpc_data["buttonPrimaryLabel"] = "Join Server"
rpc_data["buttonPrimaryUrl"] = "steam://open/friends"-- .. "108.5.3.134:27015"
rpc_data["buttonSecondaryLabel"] = "Join Server"
rpc_data["buttonSecondaryUrl"] = "steam://open/friends"-- .. "108.5.3.134:27015"
rpc_data["partySize"] = player.GetCount()
rpc_data["partyMax"] = game.MaxPlayers()
rpc_data["largeImageKey"] = "benny_1"--"map_b-mp_6t"
rpc_data["largeImageText"] = "The Six Team Map"
--rpc_data["smallImageKey"] = "doof2"
--rpc_data["smallImageText"] = "Domination"
local NewTime = os.time() - math.floor(CurTime())
local modedata = BennyGame:GetModeData()
local modename = modedata and l8( modedata.name ) or "(unknown)"
local details = modename .. " on " .. BennyGame:GetMapName()
local title = ""
if BennyGame:GetState() == BG_STATE_ACTIVE then
rpc_data["startTimestamp"] = NewTime + BennyGame:GetRoundStartedAt()
rpc_data["endTimestamp"] = NewTime + BennyGame:GetRoundStartedAt() + BennyGame:GetTimeLimit()
local myteam = LocalPlayer():Team()
local myteamscore = BennyGame:GetScoreForTeam( myteam )
if BennyGame.RTeamID[ myteam ] then
-- In play
local BiggestScore = 0
for TeamID, RealTeamID in ipairs( BennyGame.TeamsInPlay ) do
if RealTeamID == myteam then continue end
BiggestScore = math.max( BiggestScore, BennyGame:GetScoreForTeam( RealTeamID ) )
end
if myteamscore > BiggestScore then
details = details .. " ▪ Winning"
elseif myteamscore == BiggestScore then
details = details .. " ▪ Tied"
else
details = details .. " ▪ Losing"
end
else
details = details .. " ▪ Spectating"
end
local first = true
if BennyGame.RTeamID[ myteam ] then
details = details .. "" .. myteamscore
first = false
else
details = details .. ""
end
for TeamID, RealTeamID in ipairs( BennyGame.TeamsInPlay ) do
if RealTeamID == myteam then continue end
details = details .. (first and "" or "-") .. BennyGame:GetScoreForTeam( RealTeamID ) -- placeholder, i need a thing
first = false
end
elseif BennyGame:GetState() == BG_STATE_PRE then
rpc_data["startTimestamp"] = NewTime + BennyGame:GetPregameStartedAt()
rpc_data["endTimestamp"] = NewTime + BennyGame:GetPregameStartedAt() + BennyGame:GetPregameTime()
title = "Pregame"
elseif BennyGame:GetState() == BG_STATE_POST then
rpc_data["startTimestamp"] = NewTime + BennyGame:GetRoundFinishedAt()
rpc_data["endTimestamp"] = NewTime + BennyGame:GetRoundFinishedAt() + BennyGame:GetPostgameTime()
title = "Postgame"
elseif BennyGame:GetState() == BG_STATE_WAITINGFORPLAYERS then
rpc_data["startTimestamp"] = nil--NewTime + BennyGame:GetRoundFinishedAt() + BennyGame:GetPostgameTime()
rpc_data["endTimestamp"] = nil
title = "Waiting for Players"
end
rpc_data["details"] = details
rpc_data["state"] = title
DiscordUpdateRPC(rpc_data)
end
hook.Add("Think", "RPresence_Think_Discord", function()
if !RPC_Initialized then
DiscordRPCInitialize(RPC_AppID)
DiscordUpdate()
RPC_Initialized = true
RPC_NextUpdate = RealTime() + 1
end
if RPC_NextUpdate <= RealTime() then
DiscordUpdate()
RPC_NextUpdate = RealTime() + 1
end
end)
else
print("A module is missing: gdiscord")
end
if util.IsBinaryModuleInstalled("steamrichpresencer") then
require("steamrichpresencer")
function SteamUpdate()
local title = "Your Name Is Benny"
--title = " ▪ Domination on SixT"
--title = " ▪ Winning"
--title = " ▪ 999-10"
local modedata = BennyGame:GetModeData()
local modename = modedata and l8( modedata.name ) or "(unknown)"
title = title .. "" .. modename .. " on " .. BennyGame:GetMapName()
if BennyGame:GetState() == BG_STATE_ACTIVE then
local myteam = LocalPlayer():Team()
local myteamscore = BennyGame:GetScoreForTeam( myteam )
if BennyGame.RTeamID[ myteam ] then
-- In play
local BiggestScore = 0
for TeamID, RealTeamID in ipairs( BennyGame.TeamsInPlay ) do
if RealTeamID == myteam then continue end
BiggestScore = math.max( BiggestScore, BennyGame:GetScoreForTeam( RealTeamID ) )
end
if myteamscore > BiggestScore then
title = title .. " ▪ Winning"
elseif myteamscore == BiggestScore then
title = title .. " ▪ Tied"
else
title = title .. " ▪ Losing"
end
else
title = title .. " ▪ Spectating"
end
local first = true
if BennyGame.RTeamID[ myteam ] then
title = title .. "" .. myteamscore
first = false
else
title = title .. ""
end
for TeamID, RealTeamID in ipairs( BennyGame.TeamsInPlay ) do
if RealTeamID == myteam then continue end
title = title .. (first and "" or "-") .. BennyGame:GetScoreForTeam( RealTeamID ) -- placeholder, i need a thing
first = false
end
elseif BennyGame:GetState() == BG_STATE_PRE then
title = title .. " ▪ Pregame"
elseif BennyGame:GetState() == BG_STATE_POST then
title = title .. " ▪ Postgame"
elseif BennyGame:GetState() == BG_STATE_WAITINGFORPLAYERS then
title = title .. " ▪ Waiting for Players"
end
steamworks.SetRichPresence("generic", title)
steamworks.SetRichPresence("steam_player_group", tostring(BennyGame:GetUUID()) )
steamworks.SetRichPresence("steam_player_group_size", tostring(#player.GetHumans()) )
end
hook.Add("Think", "RPresence_Think_Steam", function()
if (Steam_NextUpdate or 0) <= RealTime() then
SteamUpdate()
Steam_NextUpdate = RealTime() + 1
end
end)
else
print("A module is missing: steamrichpresencer")
end

View File

@ -42,13 +42,8 @@ function TSelShared( tbl, seed )
return tbl[math.Round( util.SharedRandom( seed, 1, #tbl ) )] return tbl[math.Round( util.SharedRandom( seed, 1, #tbl ) )]
end end
-- Language might want to be loaded first
-- Otherwise things will fail to call 'l8'
AC("language.lua") AC("language.lua")
IN("language.lua") IN("language.lua")
AC("convars.lua")
IN("convars.lua")
AC("camera.lua") AC("camera.lua")
IN("camera.lua") IN("camera.lua")
AC("items.lua") AC("items.lua")
@ -66,11 +61,6 @@ IN("teams.lua")
AC("pausemenu.lua") AC("pausemenu.lua")
IN("pausemenu.lua") IN("pausemenu.lua")
AC("richpresence_test.lua")
if CLIENT then
IN("richpresence_test.lua")
end
AC("debugmenu.lua") AC("debugmenu.lua")
IN("debugmenu.lua") IN("debugmenu.lua")