From 4fa3f9b09dad6a1d811a85ea5f1d57b1464703a7 Mon Sep 17 00:00:00 2001 From: PixelGM Date: Sat, 28 Aug 2021 13:19:59 +0700 Subject: [PATCH] Separation between ValidEntity and ValidEntityVisuals --- baseentity.h | 3 ++- visuals.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/baseentity.h b/baseentity.h index 06382ab..6adb15a 100644 --- a/baseentity.h +++ b/baseentity.h @@ -313,7 +313,7 @@ struct CBaseEntity return true; } - const bool ValidEntityIgnoreInfected() + const bool ValidEntityVisuals() { if (this->IsDormant()) return false; @@ -356,6 +356,7 @@ struct CBaseEntity else if (m_Group == GROUP_INFECTED) { + //Return false to undraw the infected if (gCvars.INGOREINFECTED) return false; diff --git a/visuals.cpp b/visuals.cpp index 6fee725..fb16d26 100644 --- a/visuals.cpp +++ b/visuals.cpp @@ -292,7 +292,7 @@ void ESP::draw(CBaseEntity* pLocal) continue; //Draw Player Box ESP - if (pEntity->GetGroup() && pEntity->ValidEntityIgnoreInfected()) + if (pEntity->GetGroup() && pEntity->ValidEntityVisuals()) { DrawPlayer(pEntity, pLocal); }