From 037e39a626b424992d3c8d8ea62412acda13e5e6 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Wed, 21 Dec 2016 12:11:51 +0300 Subject: [PATCH] ProjESP fixed --- cathook/src/drawing.cpp | 9 +++++++++ cathook/src/entity.cpp | 2 +- cathook/src/hack.cpp | 2 ++ cathook/src/hacks/Aimbot.cpp | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cathook/src/drawing.cpp b/cathook/src/drawing.cpp index 419b7461..1500fb3b 100644 --- a/cathook/src/drawing.cpp +++ b/cathook/src/drawing.cpp @@ -174,6 +174,15 @@ Color colors::EntityF(CachedEntity* ent) { result = green; // TODO currency pack (red) } + if (IsProjectile(ent->m_pEntity)) { + if (ent->m_iTeam == TEAM_BLU) result = blu; + else if (ent->m_iTeam == TEAM_RED) result = red; + if (ent->m_bCritProjectile) { + if (ent->m_iTeam == TEAM_BLU) result = blu_u; + else if (ent->m_iTeam == TEAM_RED) result = red_u; + } + } + if (IsPlayer(ent->m_pEntity) || IsBuilding(ent->m_pEntity)) { if (ent->m_iTeam == TEAM_BLU) result = blu; else if (ent->m_iTeam == TEAM_RED) result = red; diff --git a/cathook/src/entity.cpp b/cathook/src/entity.cpp index 2cc1bd2a..95dfb1ec 100644 --- a/cathook/src/entity.cpp +++ b/cathook/src/entity.cpp @@ -59,7 +59,7 @@ void EntityVariables::Init() { this->nForceTauntCam = gNetvars.get_offset("DT_TFPlayer", "m_nForceTauntCam"); this->iFOV = gNetvars.get_offset("DT_BasePlayer", "m_iFOV"); this->iDefaultFOV = gNetvars.get_offset("DT_BasePlayer", "m_iDefaultFOV"); - this->Rocket_bCritical = gNetvars.get_offset("DT_TFBaseRocket", "m_bCritical"); + this->Rocket_bCritical = gNetvars.get_offset("DT_TFProjectile_Rocket", "m_bCritical"); this->Grenade_bCritical = gNetvars.get_offset("DT_TFWeaponBaseGrenadeProj", "m_bCritical"); } diff --git a/cathook/src/hack.cpp b/cathook/src/hack.cpp index f60417b0..fe53c822 100644 --- a/cathook/src/hack.cpp +++ b/cathook/src/hack.cpp @@ -9,6 +9,7 @@ #include #include +#include //#include #include #include @@ -366,6 +367,7 @@ void hack::CC_Cat(const CCommand& args) { void hack::Initialize() { logging::Initialize(); + prctl(PR_SET_DUMPABLE,0,42,42,42); logging::Info("Build: " __DATE__ " " __TIME__); logging::Info("Loading shared objects..."); sharedobj::LoadAllSharedObjects(); diff --git a/cathook/src/hacks/Aimbot.cpp b/cathook/src/hacks/Aimbot.cpp index 0116a460..0e889522 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() > 105) return false; + if ((enemy_pos - my_pos).Length() > 95) 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() > 105) return false; + if ((enemy_pos - g_pLocalPlayer->v_Origin).Length() > 95) return false; } Vector resultAim; // TODO fix proj buildings