Skip to content

Commit

Permalink
Skip when entity index is not an player
Browse files Browse the repository at this point in the history
Skip when entity index is not an player
  • Loading branch information
SmileYzn authored Feb 6, 2024
1 parent 4be18aa commit a0d0f2d
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 @@ -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;

Expand Down

0 comments on commit a0d0f2d

Please sign in to comment.