Skip to content

Commit

Permalink
Limit ammo explosive power
Browse files Browse the repository at this point in the history
Helps a lot to prevent ammo boxes acting like nukes when blowing up
  • Loading branch information
thecraftianman committed Nov 30, 2023
1 parent 1af8ce0 commit 4e92462
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/entities/acf_ammo/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,8 @@ do -- ACF Activation and Damage -----------------
local BulletData = self.BulletData
local Filler = BulletData.FillerMass or 0
local Propellant = BulletData.PropMass or 0
local Explosive = (Filler + Propellant * (ACF.PropImpetus / ACF.HEPower)) * self.Ammo
local AmmoPower = self.Ammo ^ 0.7 -- Arbitrary exponent to reduce ammo-based explosive power
local Explosive = (Filler + Propellant * (ACF.PropImpetus / ACF.HEPower)) * AmmoPower
local FragMass = BulletData.ProjMass or Explosive * 0.5
local DmgInfo = Objects.DamageInfo(self, self.Inflictor)

Expand Down

0 comments on commit 4e92462

Please sign in to comment.