From 67994fb394f4cae875fc09541eb45f638c21c3ab Mon Sep 17 00:00:00 2001 From: TotallyNotElite <1yourexperiment@protonmail.com> Date: Tue, 11 Jun 2019 15:43:19 +0200 Subject: [PATCH] small fix to tracers --- src/hacks/Tracers.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hacks/Tracers.cpp b/src/hacks/Tracers.cpp index 64d5e22d..e500e07d 100644 --- a/src/hacks/Tracers.cpp +++ b/src/hacks/Tracers.cpp @@ -117,15 +117,17 @@ void draw() if (CE_INVALID(ent)) { - if (i > 32) + if (i > g_IEngine->GetMaxClients()) continue; if (g_pPlayerResource->GetTeam(i) == g_pLocalPlayer->team || !g_pPlayerResource->isAlive(i)) continue; auto vec = soundcache::GetSoundLocation(i); if (!vec) continue; + if (*max_dist && vec->DistTo(g_pLocalPlayer->v_Origin) > *max_dist) + continue; origin = *vec; - color = colors::FromRGBA8(160, 160, 160, *opaque); + color = colors::FromRGBA8(160, 160, 160, *opaque); } else {