From a43983ee5c2cdaf82ced14e5172987bca84bebb9 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Wed, 21 Dec 2016 10:58:01 +0300 Subject: [PATCH] Reduced melee aiming range. Fixed autoheal trying to heali local player. Fixed vaccinator detection. --- cathook/src/drawing.cpp | 2 +- cathook/src/hacks/Aimbot.cpp | 4 ++-- cathook/src/hacks/AutoHeal.cpp | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cathook/src/drawing.cpp b/cathook/src/drawing.cpp index 771b48b6..419b7461 100644 --- a/cathook/src/drawing.cpp +++ b/cathook/src/drawing.cpp @@ -182,7 +182,7 @@ Color colors::EntityF(CachedEntity* ent) { if (ent->m_iTeam == TEAM_BLU) result = blu_u; else if (ent->m_iTeam == TEAM_RED) result = red_u; } - if (ent->Var(netvar.iCond2) & cond_ex::vacc_bullet) { + if (ent->Var(netvar.iCond1) & cond_ex::vacc_bullet) { if (ent->m_iTeam == TEAM_BLU) result = blu_v; else if (ent->m_iTeam == TEAM_RED) result = red_v; } diff --git a/cathook/src/hacks/Aimbot.cpp b/cathook/src/hacks/Aimbot.cpp index 4f6ec2e9..0116a460 100644 --- a/cathook/src/hacks/Aimbot.cpp +++ b/cathook/src/hacks/Aimbot.cpp @@ -305,7 +305,7 @@ bool Aimbot::ShouldTarget(IClientEntity* entity) { if ((enemy_pos - my_pos).Length() > v_iMaxRange->GetInt()) return false; } if (GetWeaponMode(g_pLocalPlayer->entity) == weaponmode::weapon_melee) { - if ((enemy_pos - my_pos).Length() > 120) return false; + if ((enemy_pos - my_pos).Length() > 105) return false; } int econd = GetEntityValue(entity, netvar.iCond1); if ((econd & cond_ex::vacc_bullet)) return false; @@ -333,7 +333,7 @@ bool Aimbot::ShouldTarget(IClientEntity* entity) { if ((enemy_pos - g_pLocalPlayer->v_Origin).Length() > v_iMaxRange->GetInt()) return false; } if (GetWeaponMode(g_pLocalPlayer->entity) == weaponmode::weapon_melee) { - if ((enemy_pos - g_pLocalPlayer->v_Origin).Length() > 120) return false; + if ((enemy_pos - g_pLocalPlayer->v_Origin).Length() > 105) return false; } Vector resultAim; // TODO fix proj buildings diff --git a/cathook/src/hacks/AutoHeal.cpp b/cathook/src/hacks/AutoHeal.cpp index 450354d9..7d7e5254 100644 --- a/cathook/src/hacks/AutoHeal.cpp +++ b/cathook/src/hacks/AutoHeal.cpp @@ -54,6 +54,7 @@ bool AutoHeal::CanHeal(int idx) { IClientEntity* ent = interfaces::entityList->GetClientEntity(idx); if (!ent) return false; if (ent->GetClientClass()->m_ClassID != ClassID::CTFPlayer) return false; + if (interfaces::engineClient->GetLocalPlayer() == idx) return false; if (GetEntityValue(ent, netvar.iLifeState)) return false; if (g_pLocalPlayer->team != GetEntityValue(ent, netvar.iTeamNum)) return false; if (g_pLocalPlayer->v_Origin.DistToSqr(ent->GetAbsOrigin()) > 420 * 420) return false;