Restore HL2DM coop spawn loadout
This commit is contained in:
+30
-5
@@ -86,11 +86,36 @@ function GM:IsSpawnpointSuitable(ply, spawnpointent, bMakeSuitable)
|
||||
return true
|
||||
end
|
||||
|
||||
function GM:PlayerLoadout(ply)
|
||||
if (not striponspawn) then
|
||||
ply:Give("weapon_fists")
|
||||
end
|
||||
end
|
||||
local hl2dmLoadout
|
||||
if SERVER then
|
||||
hl2dmLoadout = CreateConVar(
|
||||
"gc_hl2dmloadout",
|
||||
"1",
|
||||
FCVAR_ARCHIVE,
|
||||
"Give the standard HL2 Deathmatch spawn weapons expected by legacy coop maps"
|
||||
)
|
||||
end
|
||||
|
||||
function GM:PlayerLoadout(ply)
|
||||
if striponspawn then return end
|
||||
|
||||
ply:Give("weapon_fists")
|
||||
if not hl2dmLoadout or not hl2dmLoadout:GetBool() then return end
|
||||
|
||||
-- Legacy HL2DM coop maps commonly place ammo for these weapons but rely on
|
||||
-- CHL2MP_Player::GiveDefaultItems to supply the weapons themselves.
|
||||
ply:Give("weapon_crowbar")
|
||||
ply:Give("weapon_pistol")
|
||||
ply:Give("weapon_smg1")
|
||||
ply:Give("weapon_frag")
|
||||
ply:Give("weapon_physcannon")
|
||||
|
||||
ply:GiveAmmo(255, "Pistol", true)
|
||||
ply:GiveAmmo(45, "SMG1", true)
|
||||
ply:GiveAmmo(1, "Grenade", true)
|
||||
ply:GiveAmmo(6, "Buckshot", true)
|
||||
ply:GiveAmmo(6, "357", true)
|
||||
end
|
||||
|
||||
hook.Add( "SpawnMenuOpen", "DisallowSpawnMenu", function ()
|
||||
return LocalPlayer():IsAdmin()
|
||||
|
||||
Reference in New Issue
Block a user