From b932349e6dcf82fcb89a45ece871cf41148e5eb0 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Sun, 16 Apr 2017 20:40:05 +0300 Subject: [PATCH] SpyAlert when dead, entity cache spam --- src/entitycache.cpp | 2 +- src/hacks/SpyAlert.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/entitycache.cpp b/src/entitycache.cpp index 4e0e47a6..37e0e967 100644 --- a/src/entitycache.cpp +++ b/src/entitycache.cpp @@ -217,7 +217,7 @@ void EntityCache::Update() { } CachedEntity* EntityCache::GetEntity(int idx) { - if (idx < 0 || idx >= m_nMax) { + if (idx < 0 || idx > m_nMax) { logging::Info("Requested invalid entity: %i max %i", idx, m_nMax); } //logging::Info("Request entity: %i, 0x%08x", idx, m_pArray[idx].m_pEntity); diff --git a/src/hacks/SpyAlert.cpp b/src/hacks/SpyAlert.cpp index 5d84904f..9dd8af3e 100644 --- a/src/hacks/SpyAlert.cpp +++ b/src/hacks/SpyAlert.cpp @@ -26,6 +26,7 @@ float last_say = 0.0f; void Draw() { if (!enabled) return; + if (g_pLocalPlayer->life_state) return; CachedEntity* closest_spy = nullptr; float closest_spy_distance = 0.0f; int spy_count = 0;