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

27 lines
548 B
Lua

INC_SERVER()
function SWEP:Reload()
self.BaseClass.SecondaryAttack(self)
end
function SWEP:ThrowHook()
local owner = self:GetOwner()
owner.LastRangedAttack = CurTime()
local ent = ents.Create("projectile_devourer")
if ent:IsValid() then
local ang = owner:EyeAngles()
ang:RotateAroundAxis(ang:Up(), 90)
ent:SetPos(owner:GetShootPos())
ent:SetAngles(ang)
ent:SetOwner(owner)
ent:Spawn()
local phys = ent:GetPhysicsObject()
if phys:IsValid() then
phys:SetVelocityInstantaneous(owner:GetAimVector() * 2150)
end
end
end