diff --git a/include/core/offsets.hpp b/include/core/offsets.hpp index 2415d458..dbd68ef8 100755 --- a/include/core/offsets.hpp +++ b/include/core/offsets.hpp @@ -70,6 +70,10 @@ struct offsets { return PlatformOffset(4, undefined, undefined); } + static constexpr uint32_t ProcessMovement() + { + return PlatformOffset(1, undefined, undefined); + } static constexpr uint32_t ProcessGetCvarValue() { return PlatformOffset(29, undefined, undefined); diff --git a/include/hacks/Aimbot.hpp b/include/hacks/Aimbot.hpp index 75e7d571..b0e8efab 100755 --- a/include/hacks/Aimbot.hpp +++ b/include/hacks/Aimbot.hpp @@ -15,7 +15,7 @@ class IClientEntity; namespace hacks::shared::aimbot { - +bool IsBacktracking(); // Used to store aimbot data to prevent calculating it again struct AimbotCalculatedData_s { diff --git a/src/hack.cpp b/src/hack.cpp index b683a3a5..0aff59dc 100755 --- a/src/hack.cpp +++ b/src/hack.cpp @@ -1,4 +1,4 @@ -/* + /* * hack.cpp * * Created on: Oct 3, 2016 diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index e060bfb4..8b3813ed 100755 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -74,7 +74,10 @@ static settings::Float fovcircle_opacity{ "aimbot.fov-circle.opacity", "0.7" }; namespace hacks::shared::aimbot { - +bool IsBacktracking() +{ + return !(!aimkey || !aimkey.isKeyDown()) && *enable && *backtrackAimbot; +} // Current Entity int target_eid{ 0 }; CachedEntity *target = 0; @@ -469,7 +472,13 @@ bool IsTargetStateGood(CachedEntity *entity) if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle) { float cdmg = CE_FLOAT(LOCAL_W, netvar.flChargedDamage) * 3; - bool maxCharge = cdmg >= 450.0F; + float maxhs = 450.0f; + if (NET_INT(LOCAL_W, netvar.iItemDefinitionIndex) == 230 || HasCondition(entity)) + { + cdmg = roundeven(CE_FLOAT(LOCAL_W, netvar.flChargedDamage) * 1.35f); + maxhs = 203.0f; + } + bool maxCharge = cdmg >= maxhs; // Darwins damage correction, Darwins protects against 15% of // damage @@ -493,9 +502,12 @@ bool IsTargetStateGood(CachedEntity *entity) // Check if player will die from headshot or if target has more // than 450 health and sniper has max chage - if (!(entity->m_iHealth() <= 150.0F || + float hsdmg = 150.0f; + if (NET_INT(LOCAL_W, netvar.iItemDefinitionIndex) == 230) + hsdmg = roundeven(50.0f * 1.35f); + if (!(entity->m_iHealth() <= hsdmg || entity->m_iHealth() <= cdmg || !g_pLocalPlayer->bZoomed || - (maxCharge && entity->m_iHealth() > 450.0F))) + (maxCharge && entity->m_iHealth() > maxhs))) { return false; } diff --git a/src/hacks/Backtrack.cpp b/src/hacks/Backtrack.cpp index 69eab930..a766929d 100755 --- a/src/hacks/Backtrack.cpp +++ b/src/hacks/Backtrack.cpp @@ -6,6 +6,7 @@ */ #include "common.hpp" +#include "hacks/Aimbot.hpp" #include "hacks/Backtrack.hpp" #include #include @@ -258,9 +259,9 @@ bool ValidTick(BacktrackData &i, CachedEntity *ent) return true; if (istickinvalid[ent->m_IDX][i.index]) return false; - if (IsVectorVisible(g_pLocalPlayer->v_Eye, i.hitboxes[head].center, true)) + if (!hacks::shared::aimbot::IsBacktracking() || IsVectorVisible(g_pLocalPlayer->v_Eye, i.hitboxes[head].center, true)) if (fabsf(NET_FLOAT(RAW_ENT(ent), netvar.m_flSimulationTime) * 1000.0f - - getLatency() - i.simtime * 1000.0f) < 200.0f) + getLatency() - i.simtime * 1000.0f) <= 200.0f) { istickvalid[ent->m_IDX][i.index] = true; return true; diff --git a/src/hooks/CreateMove.cpp b/src/hooks/CreateMove.cpp index a3e0d836..6a9cc693 100755 --- a/src/hooks/CreateMove.cpp +++ b/src/hooks/CreateMove.cpp @@ -210,7 +210,6 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time, { entity_cache::Invalidate(); } - // Disabled because this causes EXTREME aimbot inaccuracy // if (!cmd->command_number) return ret; // PROF_BEGIN();