diff --git a/src/hacks/ESP.cpp b/src/hacks/ESP.cpp index c02ee46d..48b59cd6 100644 --- a/src/hacks/ESP.cpp +++ b/src/hacks/ESP.cpp @@ -480,7 +480,7 @@ void _FASTCALL ProcessEntityPT(CachedEntity *ent) if (sightlines && type == ENTITY_PLAYER) { // Logic for using the enum to sort out snipers - if ((int) sightlines == 2 || ((int) sightlines == 1 && CE_INT(ent, netvar.iClass) == tf_sniper)) + if (((int) sightlines == 2 || ((int) sightlines == 1 && CE_INT(ent, netvar.iClass) == tf_sniper)) && CE_GOOD(ent) && ent->hitboxes.GetHitbox(0)) { PROF_SECTION(PT_esp_sightlines); @@ -1849,12 +1849,14 @@ void SetEntityColor(CachedEntity *entity, const rgba_t &color) data[entity->m_IDX].color = color; } -static InitRoutine init([]() { - EC::Register(EC::CreateMove, cm, "cm_esp", EC::average); +static InitRoutine init( + []() + { + EC::Register(EC::CreateMove, cm, "cm_esp", EC::average); #if ENABLE_VISUALS - EC::Register(EC::Draw, Draw, "draw_esp", EC::average); - Init(); + EC::Register(EC::Draw, Draw, "draw_esp", EC::average); + Init(); #endif -}); + }); } // namespace hacks::shared::esp