From 767eb360d62183b35547590a9cea374b56352dc6 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Mon, 9 Jan 2017 20:16:21 +0300 Subject: [PATCH] works?? low fps --- cathook/src/hack.cpp | 8 ++++---- cathook/src/hacks/Aimbot.cpp | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cathook/src/hack.cpp b/cathook/src/hack.cpp index 3b0f2fc4..35df8ac9 100644 --- a/cathook/src/hack.cpp +++ b/cathook/src/hack.cpp @@ -339,13 +339,13 @@ void hack::Hk_FrameStageNotify(void* thisptr, int stage) { // Ambassador to festive ambassador changer. simple. if (!interfaces::engineClient->IsInGame()) g_Settings.bInvalid = true; //logging::Info("fsi begin");// TODO dbg - /*if (g_Settings.bHackEnabled->GetBool() && !g_Settings.bInvalid) { - if (CE_GOOD(g_pLocalPlayer->entity) && CE_GOOD(g_pLocalPlayer->weapon())) { + if (g_Settings.bHackEnabled->GetBool() && !g_Settings.bInvalid) { + /*if (CE_GOOD(g_pLocalPlayer->entity) && CE_GOOD(g_pLocalPlayer->weapon())) { int defidx = CE_INT(g_pLocalPlayer->weapon(), netvar.iItemDefinitionIndex); if (defidx == 61) { CE_INT(g_pLocalPlayer->weapon(), netvar.iItemDefinitionIndex) = 1006; } - } + }*/ if (g_Settings.bThirdperson->GetBool() && CE_GOOD(g_pLocalPlayer->entity)) { CE_INT(g_pLocalPlayer->entity, netvar.nForceTauntCam) = 1; } @@ -355,7 +355,7 @@ void hack::Hk_FrameStageNotify(void* thisptr, int stage) { CE_FLOAT(g_pLocalPlayer->entity, netvar.deadflag + 8) = last_angles.y; } } - }*/ + } ((FrameStageNotify_t*)hooks::hkClient->GetMethod(hooks::offFrameStageNotify))(thisptr, stage); /*if (g_Settings.bHackEnabled->GetBool() && !g_Settings.bInvalid) { if (stage == 5 && g_Settings.bNoFlinch->GetBool()) { diff --git a/cathook/src/hacks/Aimbot.cpp b/cathook/src/hacks/Aimbot.cpp index d362a9e5..5a4c6789 100644 --- a/cathook/src/hacks/Aimbot.cpp +++ b/cathook/src/hacks/Aimbot.cpp @@ -284,7 +284,7 @@ int Aimbot::BestHitbox(CachedEntity* target, int preferred) { if (!v_bAutoHitbox->GetBool()) return preferred; if (m_bHeadOnly) return 0; if (target->m_pHitboxCache->VisibilityCheck(preferred)) return preferred; - for (int i = 0; i < target->m_pHitboxCache->m_nNumHitboxes; i++) { + for (int i = m_bProjectileMode ? 1 : 0; i < target->m_pHitboxCache->m_nNumHitboxes; i++) { if (target->m_pHitboxCache->VisibilityCheck(i)) return i; } return -1; @@ -313,7 +313,8 @@ bool Aimbot::ShouldTarget(CachedEntity* entity) { int hitbox = BestHitbox(entity, m_iPreferredHitbox); if (m_bHeadOnly && hitbox) return false; if (m_bProjectileMode) { - if (!IsVectorVisible(g_pLocalPlayer->v_Eye, ProjectilePrediction(entity, hitbox, m_flProjSpeed, m_flProjGravity))) return false; + resultAim = ProjectilePrediction(entity, hitbox, m_flProjSpeed, m_flProjGravity); + if (!IsVectorVisible(g_pLocalPlayer->v_Eye, resultAim)) return false; } else { if (v_bMachinaPenetration->GetBool()) { if (!GetHitbox(entity, hitbox, resultAim)) return false; @@ -338,11 +339,13 @@ bool Aimbot::ShouldTarget(CachedEntity* entity) { Vector resultAim; // TODO fix proj buildings if (m_bProjectileMode) { - return false; + if (!IsBuildingVisible(entity)) return false; + resultAim = GetBuildingPosition(entity); //resultAim = entity->GetAbsOrigin(); //if (!PredictProjectileAim(g_pLocalPlayer->v_Eye, entity, (hitbox_t)m_iHitbox, m_flProjSpeed, m_bProjArc, m_flProjGravity, resultAim)) return false; } else { //logging::Info("IsVisible?"); + resultAim = GetBuildingPosition(entity); if (!IsBuildingVisible(entity)) return false; } //logging::Info("IsFOV?");