Skip to content

Commit

Permalink
ballistics_sv fix
Browse files Browse the repository at this point in the history
Fix check for bullet owner, filtering to only actually be a player
Was only added to help prevent a player from breaking their own seat when shooting from it
  • Loading branch information
LiddulBOFH committed May 30, 2024
1 parent a2c6428 commit da7db27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/acf/ballistics/ballistics_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function Ballistics.CreateBullet(BulletData)
Bullet.Color = ColorRand(100, 255)

-- Purely to allow someone to shoot out of a seat without hitting themselves and dying
if IsValid(Bullet.Owner) and Bullet.Owner:InVehicle() and IsValid(Bullet.Owner:GetVehicle().Alias) then
if IsValid(Bullet.Owner) and Bullet.Owner:IsPlayer() and Bullet.Owner:InVehicle() and IsValid(Bullet.Owner:GetVehicle().Alias) then
Bullet.Filter[#Bullet.Filter + 1] = Bullet.Owner:GetVehicle()
Bullet.Filter[#Bullet.Filter + 1] = Bullet.Owner:GetVehicle().Alias
end
Expand Down

0 comments on commit da7db27

Please sign in to comment.