diff --git a/TODO b/TODO index 001beb2d..03964704 100755 --- a/TODO +++ b/TODO @@ -15,8 +15,7 @@ //------------------------------------------------------------------------------------------------------------------// // // // Hook + Aimbot FIX // // - // // -no aim sapper // // + // // // // // // Make hacks respect Mannpower powerups and other conditions when calcuating damage, hitbox and prioritizing targets // // Proper AutoHitbox, Isnt this already a thing?? // // diff --git a/include/localplayer.hpp b/include/localplayer.hpp index 5945a4be..fdbd7e1b 100755 --- a/include/localplayer.hpp +++ b/include/localplayer.hpp @@ -23,6 +23,7 @@ public: bool bZoomed; float flZoomBegin; bool holding_sniper_rifle; + bool holding_sapper; weaponmode weapon_mode; bool using_action_slot_item{ false }; diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 6c78bebc..598e7d07 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -488,6 +488,10 @@ bool IsTargetStateGood(CachedEntity *entity) } IF_GAME(IsTF()) { + //don't aim if holding sapper + if (g_pLocalPlayer->holding_sapper) + return false; + // Wait for charge if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle) { @@ -585,6 +589,9 @@ bool IsTargetStateGood(CachedEntity *entity) } else if (entity->m_Type() == ENTITY_BUILDING) { + //Don't aim if holding sapper + if (g_pLocalPlayer->holding_sapper) + return false; // Enabled check if (!(buildings_other || buildings_sentry)) return false; diff --git a/src/localplayer.cpp b/src/localplayer.cpp index c4efb44c..7f0d2b45 100755 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -19,13 +19,17 @@ void LocalPlayer::Update() return; } holding_sniper_rifle = false; + holding_sapper = false; wep = weapon(); if (CE_GOOD(wep)) { weapon_mode = GetWeaponMode(); if (wep->m_iClassID() == CL_CLASS(CTFSniperRifle) || - wep->m_iClassID() == CL_CLASS(CTFSniperRifleDecap)) - holding_sniper_rifle = true; + wep->m_iClassID() == CL_CLASS(CTFSniperRifleDecap)) + holding_sniper_rifle = true; + if (wep->m_iClassID() == CL_CLASS(CTFWeaponBuilder) || + wep->m_iClassID() == CL_CLASS(CTFWeaponSapper)) + holding_sapper = true; } team = CE_INT(entity, netvar.iTeamNum); life_state = CE_BYTE(entity, netvar.iLifeState);