zombiesurvival-evolved/gamemodes/zombiesurvival/entities/weapons/weapon_zs_chemzombie/init.lua
William Moodhe e9da54c2f9 ZS updates for 2014-2018
Too many changes to list.
2018-05-01 18:32:59 -04:00

20 lines
549 B
Lua

INC_SERVER()
SWEP.NextAura = 0
function SWEP:Think()
if self.IdleAnimation and self.IdleAnimation <= CurTime() then
self.IdleAnimation = nil
self:SendWeaponAnim(ACT_VM_IDLE)
end
if self.NextAura <= CurTime() then
self.NextAura = CurTime() + 2
local origin = self:GetOwner():LocalToWorld(self:GetOwner():OBBCenter())
for _, ent in pairs(ents.FindInSphere(origin, 40)) do
if ent and ent:IsValidLivingHuman() and TrueVisible(origin, ent:NearestPoint(origin)) then
ent:PoisonDamage(1, self:GetOwner(), self)
end
end
end
end