2014-10-02 08:49:54 +08:00
|
|
|
AddCSLuaFile("cl_init.lua")
|
|
|
|
AddCSLuaFile("shared.lua")
|
|
|
|
|
|
|
|
include("shared.lua")
|
|
|
|
|
|
|
|
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.Owner:LocalToWorld(self.Owner:OBBCenter())
|
|
|
|
for _, ent in pairs(ents.FindInSphere(origin, 40)) do
|
2014-11-19 22:07:50 +08:00
|
|
|
if ent and ent:IsValid() and ent:IsPlayer() and ent:Team() ~= TEAM_UNDEAD and ent:Alive() and TrueVisible(origin, ent:NearestPoint(origin)) then
|
2014-10-02 08:49:54 +08:00
|
|
|
ent:PoisonDamage(1, self.Owner, self)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|