2018-05-02 06:32:59 +08:00
|
|
|
SWEP.PrintName = "Will O' Wisp"
|
|
|
|
|
|
|
|
SWEP.Primary.ClipSize = -1
|
|
|
|
SWEP.Primary.DefaultClip = -1
|
|
|
|
SWEP.Primary.Automatic = true
|
|
|
|
SWEP.Primary.Ammo = "none"
|
|
|
|
|
|
|
|
SWEP.Secondary.ClipSize = -1
|
|
|
|
SWEP.Secondary.DefaultClip = -1
|
|
|
|
SWEP.Secondary.Automatic = true
|
|
|
|
SWEP.Secondary.Ammo = "none"
|
|
|
|
|
2014-10-02 08:49:54 +08:00
|
|
|
SWEP.ZombieOnly = true
|
|
|
|
SWEP.IsMelee = true
|
|
|
|
|
|
|
|
SWEP.ViewModel = "models/weapons/v_knife_t.mdl"
|
|
|
|
SWEP.WorldModel = "models/weapons/w_knife_t.mdl"
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
util.PrecacheSound("npc/scanner/scanner_nearmiss1.wav")
|
|
|
|
util.PrecacheSound("npc/scanner/scanner_nearmiss2.wav")
|
|
|
|
util.PrecacheSound("npc/scanner/scanner_talk1.wav")
|
|
|
|
util.PrecacheSound("npc/scanner/scanner_talk2.wav")
|
|
|
|
|
|
|
|
SWEP.NextAmbientSound = 0
|
|
|
|
|
2014-10-02 08:49:54 +08:00
|
|
|
function SWEP:Initialize()
|
|
|
|
self:HideViewAndWorldModel()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:Think()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:PrimaryAttack()
|
2018-05-02 06:32:59 +08:00
|
|
|
if CurTime() < self:GetNextPrimaryAttack() then return end
|
|
|
|
self:SetNextPrimaryAttack(CurTime() + 4)
|
|
|
|
|
|
|
|
local owner = self:GetOwner()
|
|
|
|
|
|
|
|
owner.LastRangedAttack = CurTime()
|
|
|
|
|
|
|
|
if SERVER then
|
|
|
|
owner:GodEnable()
|
|
|
|
util.BlastDamageEx(self, owner, owner:GetShootPos(), 64, 5, DMG_DISSOLVE)
|
|
|
|
owner:GodDisable()
|
|
|
|
end
|
|
|
|
|
|
|
|
if IsFirstTimePredicted() then
|
|
|
|
local effectdata = EffectData()
|
|
|
|
effectdata:SetOrigin(owner:GetShootPos())
|
|
|
|
effectdata:SetNormal(owner:GetAimVector())
|
|
|
|
util.Effect("explosion_wispball", effectdata)
|
2014-10-02 08:49:54 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:SecondaryAttack()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:Reload()
|
2018-05-02 06:32:59 +08:00
|
|
|
if CurTime() >= self:GetNextSecondaryAttack() then
|
|
|
|
self:SetNextSecondaryAttack(CurTime() + 5)
|
2014-10-02 08:49:54 +08:00
|
|
|
self:EmitSound("npc/scanner/scanner_talk2.wav")
|
|
|
|
end
|
|
|
|
end
|