e9da54c2f9
Too many changes to list.
27 lines
548 B
Lua
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
|