Fixed removecond activating on respawners with no active pickup

This commit is contained in:
Retarded-Skid 2017-07-13 18:46:16 -04:00
parent 7fb57cd54c
commit ce8412afb5

View File

@ -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?