From a0d0f2d042705ce0f0ec62989b518fb49f68e7fd Mon Sep 17 00:00:00 2001 From: Cleverson Date: Tue, 6 Feb 2024 17:50:32 -0300 Subject: [PATCH] Skip when entity index is not an player Skip when entity index is not an player --- AccuracyFix/AccuracyFix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AccuracyFix/AccuracyFix.cpp b/AccuracyFix/AccuracyFix.cpp index bf5fba7..42b2830 100644 --- a/AccuracyFix/AccuracyFix.cpp +++ b/AccuracyFix/AccuracyFix.cpp @@ -100,7 +100,7 @@ void CAccuracyFix::TraceLine(const float* vStart, const float* vEnd, int fNoMons if (this->GetUserAiming(pentToSkip, &TargetIndex, &HitBoxPlace, aimDistance) > 0.0f) { - if (TargetIndex > 0) + if (TargetIndex > 0 && TargetIndex <= gpGlobals->maxClients) { auto fwdVelocity = this->m_af_accuracy[Player->m_pActiveItem->m_iId]->value;