diff --git a/cathook/TODO b/cathook/TODO index 72fe09d5..aa23ce89 100644 --- a/cathook/TODO +++ b/cathook/TODO @@ -14,10 +14,8 @@ Smoothe the smooth aim Extract TF2 path from /proc/maps Display on the left Flare aim on fire -VACC esp Triggerbot ambassador correction Aim Sticky -Melee Aimbot Hook + Aimbot FIX ESP Icons ESP Distance sort diff --git a/cathook/src/drawing.cpp b/cathook/src/drawing.cpp index 1ecb07d7..771b48b6 100644 --- a/cathook/src/drawing.cpp +++ b/cathook/src/drawing.cpp @@ -92,7 +92,7 @@ Color black; Color red, blu; Color red_b, blu_b; // Background -Color red_i, blu_i; // Invis +Color red_v, blu_v; // Invis Color red_u, blu_u; Color yellow; // Deprecated @@ -124,8 +124,8 @@ void colors::Init() { blu = Color(28, 108, 237, 255); red_b = Color(64, 32, 32, 178); blu_b = Color(32, 32, 64, 178); - red_i = Color(252, 159, 159, 255); - blu_i = Color(159, 191, 252, 255); + red_v = Color(196, 102, 108, 255); + blu_v = Color(102, 182, 196, 255); red_u = Color(216, 34, 186, 255); blu_u = Color(167, 75, 252, 255); yellow = Color(255, 255, 0, 255); @@ -182,9 +182,9 @@ 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.iCond) & cond::cloaked) { - if (ent->m_iTeam == TEAM_BLU) result = blu_i; - else if (ent->m_iTeam == TEAM_RED) result = red_i; + if (ent->Var(netvar.iCond2) & cond_ex::vacc_bullet) { + if (ent->m_iTeam == TEAM_BLU) result = blu_v; + else if (ent->m_iTeam == TEAM_RED) result = red_v; } switch (GetRelation(ent->m_pEntity)) { case FRIEND: diff --git a/cathook/src/drawing.h b/cathook/src/drawing.h index 26d33984..d9804b19 100644 --- a/cathook/src/drawing.h +++ b/cathook/src/drawing.h @@ -32,7 +32,7 @@ extern Color black; extern Color red, blu; extern Color red_b, blu_b; // Background -extern Color red_i, blu_i; // Invis +extern Color red_v, blu_v; // Vaccinator extern Color red_u, blu_u; // Ubercharged extern Color yellow; // Deprecated extern Color orange; diff --git a/cathook/src/hacks/ESP.cpp b/cathook/src/hacks/ESP.cpp index d83af268..ed4175b2 100644 --- a/cathook/src/hacks/ESP.cpp +++ b/cathook/src/hacks/ESP.cpp @@ -244,6 +244,12 @@ void ESP::ProcessEntity(CachedEntity* ent) { if (IsPlayerInvulnerable(ent->m_pEntity)) { ent->AddESPString(color, bgclr, "INVULNERABLE"); } + if (ent->Var(netvar.iCond1) & cond_ex::vacc_bullet) { + ent->AddESPString(color, bgclr, "VACCINATOR ACTIVE"); + } + if (ent->Var(netvar.iCond1) & cond_ex::vacc_pbullet) { + ent->AddESPString(color, bgclr, "VACCINATOR PASSIVE"); + } if (IsPlayerCritBoosted(ent->m_pEntity)) { ent->AddESPString(color, bgclr, "CRIT BOOSTED"); } diff --git a/cathook/src/helpers.cpp b/cathook/src/helpers.cpp index f544ec69..6aaddda9 100644 --- a/cathook/src/helpers.cpp +++ b/cathook/src/helpers.cpp @@ -415,12 +415,35 @@ float DistToSqr(IClientEntity* entity) { return g_pLocalPlayer->v_Origin.DistToSqr(entity->GetAbsOrigin()); } +bool IsMeleeWeapon(IClientEntity* ent) { + if (!ent) return false; + switch (ent->GetClientClass()->m_ClassID) { + case ClassID::CTFBat: + case ClassID::CTFBat_Fish: + case ClassID::CTFBat_Giftwrap: + case ClassID::CTFBat_Wood: + case ClassID::CTFShovel: + case ClassID::CTFKatana: + case ClassID::CTFFireAxe: + case ClassID::CTFBottle: + case ClassID::CTFSword: + case ClassID::CTFFists: + case ClassID::CTFWrench: + case ClassID::CTFRobotArm: + case ClassID::CTFBonesaw: + case ClassID::CTFClub: + case ClassID::CTFKnife: + return true; + } + return false; +} + weaponmode GetWeaponMode(IClientEntity* player) { if (!player) return weapon_invalid; int weapon_handle = GetEntityValue(player, netvar.hActiveWeapon); - if (weapon_handle == GetEntityValue(player, netvar.hMyWeapons + sizeof(int) * 2)) return weaponmode::weapon_melee; IClientEntity* weapon = interfaces::entityList->GetClientEntity(weapon_handle & 0xFFF); if (!weapon) return weaponmode::weapon_invalid; + if (IsMeleeWeapon(weapon)) return weaponmode::weapon_melee; switch (weapon->GetClientClass()->m_ClassID) { case ClassID::CTFLunchBox: case ClassID::CTFLunchBox_Drink: diff --git a/cathook/src/helpers.h b/cathook/src/helpers.h index eddcf2a8..0c077af3 100644 --- a/cathook/src/helpers.h +++ b/cathook/src/helpers.h @@ -72,6 +72,8 @@ bool IsAmbassador(IClientEntity* ent); void AimAt(Vector origin, Vector target, CUserCmd* cmd); void AimAtHitbox(IClientEntity* ent, int hitbox, CUserCmd* cmd); +bool IsMeleeWeapon(IClientEntity* ent); + QAngle VectorToQAngle(Vector in); Vector QAngleToVector(QAngle in);