From cae1a5b542a07d420ab3ec47e5a3547f1075421d Mon Sep 17 00:00:00 2001 From: julianacat Date: Thu, 13 Jul 2017 14:43:20 -0500 Subject: [PATCH] Added ignore deadringer and some checks to auto sticky and reflect --- src/hacks/Aimbot.cpp | 15 +++++++++++++-- src/hacks/AutoReflect.cpp | 4 ++++ src/hacks/AutoSticky.cpp | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 165c7d20..11202a9c 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -55,6 +55,7 @@ static CatVar wait_for_charge(CV_SWITCH, "aimbot_charge", "0", "Wait for sniper 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"); +static CatVar ignore_deadringer(CV_SWITCH, "aimbot_ignore_deadringer", "1", "Ignore deadringer", "Don't aim at deadringed enemies"); static CatVar buildings_sentry(CV_SWITCH, "aimbot_buildings_sentry", "1", "Aim Sentry", "Should aimbot aim at sentryguns?"); static CatVar buildings_other(CV_SWITCH, "aimbot_buildings_other", "1", "Aim Other building", "Should aimbot aim at other buildings"); static CatVar stickybot(CV_SWITCH, "aimbot_stickys", "0", "Aim Sticky", "Should aimbot aim at stickys"); @@ -361,8 +362,18 @@ bool IsTargetStateGood(CachedEntity* entity) { if (ignore_taunting && HasCondition(entity)) return false; // Dont target invulnerable players, ex: uber, bonk if (IsPlayerInvulnerable(entity)) return false; - // If settings allow, dont target cloaked players - if (ignore_cloak && IsPlayerInvisible(entity)) return false; + // Checks for cloaked/deadringed players + if (ignore_cloak || ignore_deadringer) { + if (IsPlayerInvisible(entity)) { + // Determine whether cloaked player is using deadringer and checks user settings accordingly + // Item id for deadringer is 59 as of time of creation + if (HasWeapon(entity, 59)) { + if (ignore_deadringer) return false; + } else { + if (ignore_cloak) return false; + } + } + } // If settings allow, dont target vaccinated players if (g_pLocalPlayer->weapon_mode == weaponmode::weapon_hitscan || LOCAL_W->m_iClassID == CL_CLASS(CTFCompoundBow)) if (ignore_vaccinator && HasCondition(entity)) return false; diff --git a/src/hacks/AutoReflect.cpp b/src/hacks/AutoReflect.cpp index 5c241dd2..7e8316b9 100644 --- a/src/hacks/AutoReflect.cpp +++ b/src/hacks/AutoReflect.cpp @@ -32,6 +32,10 @@ void CreateMove() { // Check if player is using a flame thrower if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlameThrower)) return; + + // Check for phlogistinator, which is item 594 + if (HasWeapon(LOCAL_E, 594)) return; + // If user settings allow, return if local player is in attack if (idle_only && (g_pUserCmd->buttons & IN_ATTACK)) return; diff --git a/src/hacks/AutoSticky.cpp b/src/hacks/AutoSticky.cpp index ab7ca58c..ecd178b2 100644 --- a/src/hacks/AutoSticky.cpp +++ b/src/hacks/AutoSticky.cpp @@ -81,7 +81,7 @@ void CreateMove() { if (g_pLocalPlayer->clazz != tf_demoman) return; // Check for sticky jumper, which is item 265, if true, return - if (HasWeapon(LOCAL_E, 265)); + if (HasWeapon(LOCAL_E, 265)) return; // Clear the arrays bombs.clear();