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:
Ben 2014-12-15 18:58:10 +00:00
parent 3e23a89326
commit 1f401dba4e

View file

@ -596,7 +596,9 @@ end
function GM:ReplaceMapWeapons()
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")
if wep:IsValid() then
wep:SetPos(ent:GetPos())
@ -607,9 +609,9 @@ function GM:ReplaceMapWeapons()
wep.IsPreplaced = true
end
end
ent:Remove()
end
end
end
local ammoreplacements = {