Skip to content

Commit

Permalink
Compare fraction of trace result
Browse files Browse the repository at this point in the history
Compare fraction of trace result and check if has really hit something
  • Loading branch information
SmileYzn committed Jun 17, 2024
1 parent f44667e commit 5727055
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AccuracyFix/AccuracyFix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void CAccuracyFix::TraceLine(const float* vStart, const float* vEnd, int fNoMons
{
auto trResult = gAccuracyUtil.GetUserAiming(pentToSkip, DistanceLimit);

if (!FNullEnt(trResult.pHit))
if (!FNullEnt(trResult.pHit) && (trResult.flFraction == 1.0))
{
auto TargetIndex = ENTINDEX(trResult.pHit);

Expand Down

0 comments on commit 5727055

Please sign in to comment.