2018-05-02 06:32:59 +08:00
|
|
|
INC_SERVER()
|
2014-10-02 08:49:54 +08:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
local origin = self:GetOwner():LocalToWorld(self:GetOwner():OBBCenter())
|
2014-10-02 08:49:54 +08:00
|
|
|
for _, ent in pairs(ents.FindInSphere(origin, 40)) do
|
2018-05-02 06:32:59 +08:00
|
|
|
if ent and ent:IsValidLivingHuman() and TrueVisible(origin, ent:NearestPoint(origin)) then
|
|
|
|
ent:PoisonDamage(1, self:GetOwner(), self)
|
2014-10-02 08:49:54 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|