enabled use of weapon_map_base in default ZS
Prevented weapon_map_base from being deleted so that people could use it as a tool for creating map made custom weapons in non-ze game types.
This commit is contained in:
parent
3e23a89326
commit
1f401dba4e
1 changed files with 13 additions and 11 deletions
|
@ -596,7 +596,9 @@ end
|
||||||
|
|
||||||
function GM:ReplaceMapWeapons()
|
function GM:ReplaceMapWeapons()
|
||||||
for _, ent in pairs(ents.FindByClass("weapon_*")) do
|
for _, ent in pairs(ents.FindByClass("weapon_*")) do
|
||||||
if string.sub(ent:GetClass(), 1, 10) == "weapon_zs_" then
|
local wepclass = ent:GetClass()
|
||||||
|
if wepclass ~= "weapon_map_base" then
|
||||||
|
if string.sub(wepclass, 1, 10) == "weapon_zs_" then
|
||||||
local wep = ents.Create("prop_weapon")
|
local wep = ents.Create("prop_weapon")
|
||||||
if wep:IsValid() then
|
if wep:IsValid() then
|
||||||
wep:SetPos(ent:GetPos())
|
wep:SetPos(ent:GetPos())
|
||||||
|
@ -607,9 +609,9 @@ function GM:ReplaceMapWeapons()
|
||||||
wep.IsPreplaced = true
|
wep.IsPreplaced = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ent:Remove()
|
ent:Remove()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local ammoreplacements = {
|
local ammoreplacements = {
|
||||||
|
|
Loading…
Reference in a new issue