and up we all go

adding height to the player(s) standing in the blast
This commit is contained in:
2023-05-10 23:24:10 +02:00
parent c8a777675d
commit e355cc2bc3

View File

@@ -94,6 +94,7 @@ function SWEP:SecondaryAttack()
if distance <= self.ExplosionRadius then
local push = (1 - (distance / self.ExplosionRadius)) * 900 -- Push force decreases with distance
local direction = (ply:GetPos() - explodePos):GetNormalized()
direction.z = direction.z + 0.5 -- Add upward force
ply:SetVelocity(direction * push)
end
end
@@ -109,6 +110,7 @@ function SWEP:SecondaryAttack()
end
function SWEP:CanPrimaryAttack()
if self.Weapon:Clip1() <= 0 then