Merge pull request #117 from BClark09/master
2 commits regarding custom entities
This commit is contained in:
commit
b696386ca1
2 changed files with 8 additions and 4 deletions
|
@ -40,7 +40,11 @@ end
|
|||
|
||||
function SWEP:Deploy()
|
||||
if SERVER then
|
||||
self.Owner:SelectWeapon("weapon_zs_fists")
|
||||
if GAMEMODE.ZombieEscape then
|
||||
self.Owner:SelectWeapon("weapon_zs_zeknife")
|
||||
else
|
||||
self.Owner:SelectWeapon("weapon_zs_fists")
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
|
|
@ -87,14 +87,14 @@ function meta:FireOutput(outpt, activator, caller, args)
|
|||
local intab = self[outpt]
|
||||
if intab then
|
||||
for key, tab in pairs(intab) do
|
||||
local param = ((tab.args == "") and args) or tab.args
|
||||
for __, subent in pairs(self:FindByNameHammer(tab.entityname, activator, caller)) do
|
||||
local delay = tonumber(tab.delay)
|
||||
if delay == nil or delay <= 0 then
|
||||
subent:Input(tab.input, activator, caller, tab.args)
|
||||
subent:Input(tab.input, activator, caller, param)
|
||||
else
|
||||
local inp = tab.input
|
||||
local args = tab.args
|
||||
timer.Simple(delay, function() if subent:IsValid() then subent:Input(inp, activator, caller, args) end end)
|
||||
timer.Simple(delay, function() if subent:IsValid() then subent:Input(inp, activator, caller, param) end end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue