e9da54c2f9
Too many changes to list.
24 lines
No EOL
558 B
Lua
24 lines
No EOL
558 B
Lua
AddCSLuaFile()
|
|
|
|
SWEP.Base = "weapon_zs_butcherknife"
|
|
|
|
SWEP.ZombieOnly = true
|
|
SWEP.MeleeDamage = 28
|
|
SWEP.OriginalMeleeDamage = SWEP.MeleeDamage
|
|
SWEP.Primary.Delay = 0.45
|
|
|
|
function SWEP:OnMeleeHit(hitent, hitflesh, tr)
|
|
if not hitent:IsPlayer() then
|
|
self.MeleeDamage = 18
|
|
end
|
|
end
|
|
|
|
function SWEP:PostOnMeleeHit(hitent, hitflesh, tr)
|
|
self.MeleeDamage = self.OriginalMeleeDamage
|
|
end
|
|
|
|
function SWEP:SetNextAttack()
|
|
local owner = self:GetOwner()
|
|
local armdelay = owner:GetMeleeSpeedMul()
|
|
self:SetNextPrimaryFire(CurTime() + self.Primary.Delay * armdelay)
|
|
end |