and up we all go
adding height to the player(s) standing in the blast
This commit is contained in:
@@ -94,6 +94,7 @@ function SWEP:SecondaryAttack()
|
|||||||
if distance <= self.ExplosionRadius then
|
if distance <= self.ExplosionRadius then
|
||||||
local push = (1 - (distance / self.ExplosionRadius)) * 900 -- Push force decreases with distance
|
local push = (1 - (distance / self.ExplosionRadius)) * 900 -- Push force decreases with distance
|
||||||
local direction = (ply:GetPos() - explodePos):GetNormalized()
|
local direction = (ply:GetPos() - explodePos):GetNormalized()
|
||||||
|
direction.z = direction.z + 0.5 -- Add upward force
|
||||||
ply:SetVelocity(direction * push)
|
ply:SetVelocity(direction * push)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -109,6 +110,7 @@ function SWEP:SecondaryAttack()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function SWEP:CanPrimaryAttack()
|
function SWEP:CanPrimaryAttack()
|
||||||
|
|
||||||
if self.Weapon:Clip1() <= 0 then
|
if self.Weapon:Clip1() <= 0 then
|
||||||
|
Reference in New Issue
Block a user