From d8694fd28e52254b1be21396946af49a0e7ae90f Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 17:12:19 -0400 Subject: [PATCH 01/11] Attempted to add bypass for not shooting at 100% charge --- src/hacks/Aimbot.cpp | 12 +++++++++--- tf-settings/menu.json | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index f5a36435..98f4ec75 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -52,6 +52,7 @@ static CatVar priority_mode(priority_mode_enum, "aimbot_prioritymode", "0", "Pri "SMART: Basically Auto-Threat. Will be tweakable eventually. " "FOV, DISTANCE, HEALTH are self-explainable. HEALTH picks the weakest enemy"); static CatVar wait_for_charge(CV_SWITCH, "aimbot_charge", "0", "Wait for sniper rifle charge", "Aimbot waits until it has enough charge to kill"); +static CatVar wait_for_charge_bypass(CV_SWITCH, "aimbot_charge_if_full", "1", "Sniper rifle will shoot at 100% charge even if the shot will not kill", "Aimbot waits until 100% charge"); static CatVar ignore_vaccinator(CV_SWITCH, "aimbot_ignore_vaccinator", "1", "Ignore Vaccinator", "Hitscan weapons won't fire if enemy is vaccinated against bullets"); static CatVar ignore_hoovy(CV_SWITCH, "aimbot_ignore_hoovy", "0", "Ignore Hoovies", "Aimbot won't attack hoovies"); static CatVar ignore_cloak(CV_SWITCH, "aimbot_ignore_cloak", "1", "Ignore cloaked", "Don't aim at invisible enemies"); @@ -114,6 +115,7 @@ bool silent_huntsman { false }; // for current frame, to avoid performing them again AimbotCalculatedData_s calculated_data_array[2048] {}; +// The main "loop" of the aimbot. // The main "loop" of the aimbot. void CreateMove() { @@ -282,7 +284,7 @@ CachedEntity* RetrieveBestTarget(bool aimkey_state) { // We dont have a target currently so we must find one, reset statuses foundTarget = false; - target_last = -1; + target_last = nullptr; // Book keeping vars float target_highest_score, scr; @@ -350,7 +352,10 @@ bool IsTargetStateGood(CachedEntity* entity) { float bdmg = CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flChargedDamage); if (g_GlobalVars->curtime - g_pLocalPlayer->flZoomBegin <= 1.0f) bdmg = 50.0f; if ((bdmg * 3) < (HasDarwins(entity) ? (entity->m_iHealth * 1.15) : entity->m_iHealth)) { - return false; + // If player has charge bypassing fire at 100% charge even if wont kill + if (!wait_for_charge_bypass || (wait_for_charge_bypass && g_pLocalPlayer->flZoomBegin != 1.0f)) { + return false; + } } } // If settings allow, ignore taunting players @@ -887,7 +892,7 @@ CachedEntity* CurrentTarget() { // Used for when you join and leave maps to reset aimbot vars void Reset() { - target_last = -1; + target_last = nullptr; projectile_mode = false; } @@ -956,3 +961,4 @@ void DrawText() { + diff --git a/tf-settings/menu.json b/tf-settings/menu.json index 6a8797c9..1e05434e 100644 --- a/tf-settings/menu.json +++ b/tf-settings/menu.json @@ -12,6 +12,7 @@ "aimbot_fov_draw", "aimbot_prioritymode", "aimbot_charge", + "aimbot_charge_if_full", { "type": "list", "name": "Ignore", @@ -499,4 +500,4 @@ } ] } -] \ No newline at end of file +] From c2a05660ad00469de851e40f8008870073e7e50a Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 17:22:37 -0400 Subject: [PATCH 02/11] Added lag exploit health pack var to menu --- tf-settings/menu.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tf-settings/menu.json b/tf-settings/menu.json index 1e05434e..29fdf5fe 100644 --- a/tf-settings/menu.json +++ b/tf-settings/menu.json @@ -429,6 +429,7 @@ "removecond_stun", "instant_decloak", "instant_rezoom", + "infinite_healthpacks", "lagexploit_mini" ] }, From f03709c622b9bd8bf1f4a884545c036e0849248b Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 17:28:28 -0400 Subject: [PATCH 03/11] Updated code of conduct because the last one was designed for pussies and crybabies --- CODE_OF_CONDUCT.md | 46 +++------------------------------------------- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index fe498407..4c727443 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,46 +1,6 @@ -# Contributor Covenant Code of Conduct +# Contributor Code of Conduct -## Our Pledge +This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters. -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. +For more information please visit the [No Code of Conduct](https://github.com/domgetter/NCoC) homepage. -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at nullifiedcat+contact@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ From ab3efef3215cc51f27d0bf565cdea4a0e58863db Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 17:43:09 -0400 Subject: [PATCH 04/11] Fixed Removeconding on health packs if overhealed --- src/hacks/LagExploit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hacks/LagExploit.cpp b/src/hacks/LagExploit.cpp index 4799835d..a93e3d28 100644 --- a/src/hacks/LagExploit.cpp +++ b/src/hacks/LagExploit.cpp @@ -148,7 +148,7 @@ void CreateMove() { } // Infinite healthpacks (I'll probably have to move this somewhere else) - if (infinite_packs && CE_GOOD(LOCAL_E) && LOCAL_E->m_iHealth != LOCAL_E->m_iMaxHealth) { + if (infinite_packs && CE_GOOD(LOCAL_E) && LOCAL_E->m_iHealth <= LOCAL_E->m_iMaxHealth) { ICollideable* p = RAW_ENT(LOCAL_E)->GetCollideable(); const Vector& max1 = p->OBBMaxs(); const Vector& min1 = p->OBBMins(); From 3d60e52156c08efd8e74a1d62edc241feed2947c Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 17:57:48 -0400 Subject: [PATCH 05/11] Updated wait_for_charge bypass --- src/hacks/Aimbot.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 98f4ec75..b0bb2744 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -349,11 +349,11 @@ bool IsTargetStateGood(CachedEntity* entity) { IF_GAME (IsTF()) { // If settings allow waiting for charge, and current charge cant kill target, dont aim if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle) { - float bdmg = CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flChargedDamage); - if (g_GlobalVars->curtime - g_pLocalPlayer->flZoomBegin <= 1.0f) bdmg = 50.0f; - if ((bdmg * 3) < (HasDarwins(entity) ? (entity->m_iHealth * 1.15) : entity->m_iHealth)) { - // If player has charge bypassing fire at 100% charge even if wont kill - if (!wait_for_charge_bypass || (wait_for_charge_bypass && g_pLocalPlayer->flZoomBegin != 1.0f)) { + if (!wait_for_charge_bypass || (wait_for_charge_bypass && g_pLocalPlayer->flZoomBegin >= 1.0f)) { + float bdmg = CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flChargedDamage); + if (g_GlobalVars->curtime - g_pLocalPlayer->flZoomBegin <= 1.0f) bdmg = 50.0f; + if ((bdmg * 3) < (HasDarwins(entity) ? (entity->m_iHealth * 1.15) : entity->m_iHealth)) { + // If player has charge bypassing fire at 100% charge even if wont kill return false; } } From 2cc980e31a7eb82bc4ba3b6791f1a40e7cb47cd7 Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 18:00:00 -0400 Subject: [PATCH 06/11] Updated wait_for_charge bypass 2, forgot to save file last time --- src/hacks/Aimbot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index b0bb2744..f6131367 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -349,7 +349,7 @@ bool IsTargetStateGood(CachedEntity* entity) { IF_GAME (IsTF()) { // If settings allow waiting for charge, and current charge cant kill target, dont aim if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle) { - if (!wait_for_charge_bypass || (wait_for_charge_bypass && g_pLocalPlayer->flZoomBegin >= 1.0f)) { + if (!wait_for_charge_bypass || (wait_for_charge_bypass && g_pLocalPlayer->flZoomBegin <= 1.0f)) { float bdmg = CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flChargedDamage); if (g_GlobalVars->curtime - g_pLocalPlayer->flZoomBegin <= 1.0f) bdmg = 50.0f; if ((bdmg * 3) < (HasDarwins(entity) ? (entity->m_iHealth * 1.15) : entity->m_iHealth)) { From 69b98fed2b47fc34ce5976bfd8dabc50efd6ac84 Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 18:00:41 -0400 Subject: [PATCH 07/11] Attempting to update removecond to fire on both health and ammo packs --- src/hacks/LagExploit.cpp | 18 +++++++++++++----- tf-settings/menu.json | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/hacks/LagExploit.cpp b/src/hacks/LagExploit.cpp index a93e3d28..d0ecdc69 100644 --- a/src/hacks/LagExploit.cpp +++ b/src/hacks/LagExploit.cpp @@ -58,7 +58,7 @@ bool ExploitActive() { static CatVar mini_lag_exploit(CV_INT, "lagexploit_mini", "0", "Mini Lag Exploit"); static CatVar instant_weapon_switch(CV_SWITCH, "instant_weapon_switch", "0", "Instant weapon switch"); -static CatVar infinite_packs(CV_SWITCH, "infinite_healthpacks", "0", "Infinite Healthpacks", "Activate removecond when standing on healthpack while having not full HP"); +static CatVar infinite_packs(CV_SWITCH, "infinite_packs", "0", "Infinite Pickups", "Activate removecond when standing on pickups while having not full HP/Ammo"); void CreateMove() { if (CE_BAD(LOCAL_E)) return; @@ -147,16 +147,24 @@ void CreateMove() { amount = int(mini_lag_exploit); } - // Infinite healthpacks (I'll probably have to move this somewhere else) - if (infinite_packs && CE_GOOD(LOCAL_E) && LOCAL_E->m_iHealth <= LOCAL_E->m_iMaxHealth) { + // Infinite pickups (I'll probably have to move this somewhere else) + if (infinite_packs && CE_GOOD(LOCAL_E)) { ICollideable* p = RAW_ENT(LOCAL_E)->GetCollideable(); const Vector& max1 = p->OBBMaxs(); const Vector& min1 = p->OBBMins(); for (int i = 1; i < entity_cache::max; i++) { CachedEntity* e = ENTITY(i); if (e->m_iClassID != CL_CLASS(CBaseAnimating)) continue; - if (e->m_ItemType != ITEM_HEALTH_SMALL && e->m_ItemType != ITEM_HEALTH_MEDIUM && e->m_ItemType != ITEM_HEALTH_LARGE) continue; - if (e->m_flDistance < 54.0f) amount = 900; + if (e->m_flDistance > 54.0f) 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; + } + // Lag for ammo / metal + 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; + } + // Not working for some reason? /*ICollideable* c = RAW_ENT(e)->GetCollideable(); const Vector& max2 = c->OBBMaxs(); diff --git a/tf-settings/menu.json b/tf-settings/menu.json index 29fdf5fe..0a8847c9 100644 --- a/tf-settings/menu.json +++ b/tf-settings/menu.json @@ -429,7 +429,7 @@ "removecond_stun", "instant_decloak", "instant_rezoom", - "infinite_healthpacks", + "infinite_packs", "lagexploit_mini" ] }, From 7fb57cd54cd09f970aef24d9e44ff20da8150be6 Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 18:26:03 -0400 Subject: [PATCH 08/11] Fixed removeconding at full health from last update --- src/hacks/LagExploit.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hacks/LagExploit.cpp b/src/hacks/LagExploit.cpp index d0ecdc69..7bec64db 100644 --- a/src/hacks/LagExploit.cpp +++ b/src/hacks/LagExploit.cpp @@ -157,13 +157,15 @@ void CreateMove() { if (e->m_iClassID != CL_CLASS(CBaseAnimating)) continue; if (e->m_flDistance > 54.0f) continue; // Lag for health - if (LOCAL_E->m_iHealth <= LOCAL_E->m_iMaxHealth) { + 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; } // Lag for ammo / metal - if (LOCAL_E->m_iAmmo <= LOCAL_E->m_iMaxAmmo) { + // 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; - } + // Not working for some reason? /*ICollideable* c = RAW_ENT(e)->GetCollideable(); From ce8412afb5733acb75b4e1299498cd25e0553081 Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 18:46:16 -0400 Subject: [PATCH 09/11] 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? From 48ea721a82756c7bc5571c77d835042d99ded5e3 Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 18:49:49 -0400 Subject: [PATCH 10/11] Update comment on Aimbot changes --- src/hacks/Aimbot.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index f6131367..88aa7598 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -347,13 +347,12 @@ bool IsTargetStateGood(CachedEntity* entity) { if (entity->m_flDistance > EffectiveTargetingRange()) return false; } IF_GAME (IsTF()) { - // If settings allow waiting for charge, and current charge cant kill target, dont aim + // If settings allow waiting for charge, and current charge cant kill target, dont aim unless at 100% and the player wants to fire at 100% anyways if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle) { if (!wait_for_charge_bypass || (wait_for_charge_bypass && g_pLocalPlayer->flZoomBegin <= 1.0f)) { float bdmg = CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flChargedDamage); if (g_GlobalVars->curtime - g_pLocalPlayer->flZoomBegin <= 1.0f) bdmg = 50.0f; if ((bdmg * 3) < (HasDarwins(entity) ? (entity->m_iHealth * 1.15) : entity->m_iHealth)) { - // If player has charge bypassing fire at 100% charge even if wont kill return false; } } From 4f54a3462927db80b83376d07b3afdd723ddd544 Mon Sep 17 00:00:00 2001 From: Retarded-Skid Date: Thu, 13 Jul 2017 20:53:30 -0400 Subject: [PATCH 11/11] Updated removecond for pickups to use AddExploitTicks like the other options --- src/hacks/LagExploit.cpp | 72 +++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/src/hacks/LagExploit.cpp b/src/hacks/LagExploit.cpp index 7428252d..a429ac39 100644 --- a/src/hacks/LagExploit.cpp +++ b/src/hacks/LagExploit.cpp @@ -128,6 +128,43 @@ void CreateMove() { } } } + + // Infinite pickups (health and ammo) + if (infinite_packs && CE_GOOD(LOCAL_E)) { + ICollideable* p = RAW_ENT(LOCAL_E)->GetCollideable(); + const Vector& max1 = p->OBBMaxs(); + const Vector& min1 = p->OBBMins(); + for (int i = 1; i < entity_cache::max; i++) { + CachedEntity* e = ENTITY(i); + // CE_BAD is used to prevent removeconding on empty spaces where the item hasn't respawned + // Distance check so removecond activates before collision with the pickup + if (CE_BAD(e) || e->m_iClassID != CL_CLASS(CBaseAnimating) || e->m_flDistance > 66.0f) { + continue; + } + // Lag for health + if (LOCAL_E->m_iHealth < LOCAL_E->m_iMaxHealth && (e->m_ItemType == ITEM_HEALTH_SMALL || e->m_ItemType == ITEM_HEALTH_MEDIUM || e->m_ItemType == ITEM_HEALTH_LARGE) ) { + AddExploitTicks(3); + } + // Lag for ammo / metal + // TODO: Alternative to - LOCAL_E->m_iAmmo < LOCAL_E->m_iMaxAmmo + // That is pseudocode but checking each weapon for ammo + engie for metal would be ideal + if ((e->m_ItemType == ITEM_AMMO_SMALL || e->m_ItemType == ITEM_AMMO_MEDIUM || e->m_ItemType == ITEM_AMMO_LARGE) ) { + AddExploitTicks(3); + } + + // Not working for some reason? + /*ICollideable* c = RAW_ENT(e)->GetCollideable(); + const Vector& max2 = c->OBBMaxs(); + const Vector& min2 = c->OBBMins(); + if ( (min1.x <= max2.x && max1.x >= min2.x) && + (min1.y <= max2.y && max1.y >= min2.y) && + (min1.z <= max2.z && max1.z >= min2.z) ) { + logging::Info("Collision with %d", i); + amount = 900; + break; + }*/ + } + } } // More paste from kathook if (g_pUserCmd->buttons & (IN_ATTACK | IN_ATTACK2)) { @@ -147,41 +184,6 @@ void CreateMove() { amount = int(mini_lag_exploit); } - // Infinite pickups (I'll probably have to move this somewhere else) - if (infinite_packs && CE_GOOD(LOCAL_E)) { - ICollideable* p = RAW_ENT(LOCAL_E)->GetCollideable(); - const Vector& max1 = p->OBBMaxs(); - 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 = 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 = lagValue; - - - // Not working for some reason? - /*ICollideable* c = RAW_ENT(e)->GetCollideable(); - const Vector& max2 = c->OBBMaxs(); - const Vector& min2 = c->OBBMins(); - if ( (min1.x <= max2.x && max1.x >= min2.x) && - (min1.y <= max2.y && max1.y >= min2.y) && - (min1.z <= max2.z && max1.z >= min2.z) ) { - logging::Info("Collision with %d", i); - amount = 900; - break; - }*/ - } - } if (!amount) return; // Modifying command_number and lastoutgoingcommand turned out to be useless