Skip to content

Commit

Permalink
Fix unclamped standoff ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
marchc1 committed Jan 19, 2025
1 parent fca5ac8 commit 3566a57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/acf/entities/ammo_types/heat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ function Ammo:VerifyData(ToolData)

if not isnumber(ToolData.StandoffRatio) then
ToolData.StandoffRatio = 0
else
ToolData.StandoffRatio = math.Clamp(ToolData.StandoffRatio, 0, self.MaxStandoffRatio or 0.2)
end

if not isnumber(ToolData.LinerAngle) then
Expand Down
2 changes: 2 additions & 0 deletions lua/acf/entities/ammo_types/heatfs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function Ammo:OnLoaded()
HW = true,
SC = true,
})

self.MaxStandoffRatio = .75
end

function Ammo:UpdateRoundData(ToolData, Data, GUIData)
Expand Down

0 comments on commit 3566a57

Please sign in to comment.