From ce8412afb5733acb75b4e1299498cd25e0553081 Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 18:46:16 -0400 Subject: [PATCH] Fixed removecond activating on respawners with no active pickup --- src/hacks/LagExploit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hacks/LagExploit.cpp b/src/hacks/LagExploit.cpp index 7bec64db..7428252d 100644 --- a/src/hacks/LagExploit.cpp +++ b/src/hacks/LagExploit.cpp @@ -154,17 +154,19 @@ void CreateMove() { const Vector& min1 = p->OBBMins(); for (int i = 1; i < entity_cache::max; i++) { CachedEntity* e = ENTITY(i); + if (CE_BAD(e)) continue; if (e->m_iClassID != CL_CLASS(CBaseAnimating)) continue; if (e->m_flDistance > 54.0f) continue; + if (e->m_ItemType == ITEM_NONE) continue; // Lag for health if (LOCAL_E->m_iHealth < LOCAL_E->m_iMaxHealth) { - if (e->m_ItemType == ITEM_HEALTH_SMALL || e->m_ItemType == ITEM_HEALTH_MEDIUM || e->m_ItemType == ITEM_HEALTH_LARGE) amount = 900; + if (e->m_ItemType == ITEM_HEALTH_SMALL || e->m_ItemType == ITEM_HEALTH_MEDIUM || e->m_ItemType == ITEM_HEALTH_LARGE) amount = lagValue; } // Lag for ammo / metal // TODO: Figure out way to properly check for not having max-ammo // // if (LOCAL_E->m_iAmmo < LOCAL_E->m_iMaxAmmo) { - if (e->m_ItemType == ITEM_AMMO_SMALL || e->m_ItemType == ITEM_AMMO_MEDIUM || e->m_ItemType == ITEM_AMMO_LARGE) amount = 900; + if (e->m_ItemType == ITEM_AMMO_SMALL || e->m_ItemType == ITEM_AMMO_MEDIUM || e->m_ItemType == ITEM_AMMO_LARGE) amount = lagValue; // Not working for some reason?