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

23 lines
584 B
Lua

INC_SERVER()
function SWEP:ApplyMeleeDamage(ent, trace, damage)
if ent:IsValid() then
--[[local vel = ent:GetPos() - self:GetOwner():GetPos()
vel.z = 0
vel:Normalize()
vel = vel * 800
vel.z = 350
ent:KnockDown()
ent:SetGroundEntity(NULL)
ent:SetVelocity(vel)]]
local noknockdown = true
if CurTime() >= (ent.NextKnockdown or 0) then
noknockdown = false
ent.NextKnockdown = CurTime() + 4
end
ent:ThrowFromPositionSetZ(trace.StartPos, ent:IsPlayer() and 600 or 1600, nil, noknockdown)
end
self.BaseClass.ApplyMeleeDamage(self, ent, trace, damage)
end