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?