Исходник Proper bruteforce resolver for xy0

[COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTR
Забаненный
Статус
Оффлайн
Регистрация
6 Май 2020
Сообщения
81
Реакции[?]
25
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Всем привет, недавно заметил, что очень много людей хвалят ресольвер икфакофа, сделал его под ху0.
credits: to ikfakof

код без антипасты, в дефолтном ху0 все это есть.
TODO: проверка на бота.

C++:
#include "Resolver.h"
#include "..\Aimbot\Aimbot.h"
#include "..\Aimbot\Autowall.h"
#include "..\Aimbot\LagComp.h"
#include "..\..\Utils\Utils.h"
#include "..\..\SDK\IVEngineClient.h"
#include "..\..\SDK\Hitboxes.h"
#include "..\..\SDK\PlayerInfo.h"
#include "..\..\Utils\Math.h"
#include "..\..\Menu\Menu.h"
#include "..\..\Menu\config.h"
#include "..\..\SDK\CEntity.h"
#include "..\..\SDK\IBaseClientDll.h"

Resolver g_Resolver;

template<class T, class U>
inline T clamp(T in, U low, U high)
{
    if (in <= low)
        return low;
    else if (in >= high)
        return high;
    else
        return in;
}

void BotCheck(C_BaseEntity* ent)
{

}

static auto GetSmoothedVelocity = [](float min_delta, Vector a, Vector b) {
    Vector delta = a - b;
    float delta_length = delta.Length();

    if (delta_length <= min_delta) {
        Vector result;
        if (-min_delta <= delta_length) {
            return a;
        }
        else {
            float iradius = 1.0f / (delta_length + FLT_EPSILON);
            return b - ((delta * iradius) * min_delta);
        }
    }
    else {
        float iradius = 1.0f / (delta_length + FLT_EPSILON);
        return b + ((delta * iradius) * min_delta);
    }
};

float AngleNormalize(float angle)
{
    angle = fmodf(angle, 360.0f);
    if (angle > 180)
    {
        angle -= 360;
    }
    if (angle < -180)
    {
        angle += 360;
    }
    return angle;
}

float ApproachAngle(float target, float value, float speed)
{
    target = (target * 182.04445f) * 0.0054931641f;
    value = (value * 182.04445f) * 0.0054931641f;

    float delta = target - value;

    // Speed is assumed to be positive
    if (speed < 0)
        speed = -speed;

    if (delta < -180.0f)
        delta += 360.0f;
    else if (delta > 180.0f)
        delta -= 360.0f;

    if (delta > speed)
        value += speed;
    else if (delta < -speed)
        value -= speed;
    else
        value = target;

    return value;
}

void proper_brute(C_BaseEntity* ent)
{
    if (!Globals::LocalPlayer->IsAlive())
        return;

    auto animState = ent->AnimState();
    float m_flFakeGoalFeetYaw[65];
    // Rebuild setup velocity to receive flMinBodyYaw and flMaxBodyYaw
    Vector velocity = ent->GetVelocity();
    float spd = velocity.LengthSqr();
    if (spd > std::powf(1.2f * 260.0f, 2.f)) {
        Vector velocity_normalized = velocity.Normalize();
        velocity = velocity_normalized * (1.2f * 260.0f);
    }

    float v25 = clamp(ent->m_fDuckSpeed() + animState->m_fLandingDuckAdditiveSomething, 0.0f, 1.0f);
    float v26 = animState->m_fDuckAmount;
    float v27 = g_pClientState->m_nChokedCommands * 6.0f;
    float v28;

    // clamp
    if ((v25 - v26) <= v27) {
        if (-v27 <= (v25 - v26))
            v28 = v25;
        else
            v28 = v26 - v27;
    }
    else {
        v28 = v26 + v27;
    }

    float flDuckAmount = clamp(v28, 0.0f, 1.0f);

    Vector animationVelocity = GetSmoothedVelocity(g_pClientState->m_nChokedCommands * 2000.0f, velocity, ent->GetVelocity());
    float speed = std::fminf(animationVelocity.Length(), 260.0f);

    auto weapon = ent->GetActiveWeapon();

    float flMaxMovementSpeed = 260.0f;
    if (weapon) {
        flMaxMovementSpeed = std::fmaxf(weapon->GetCSWpnData()->max_speed, 0.001f);
    }
    float m_flGroundFraction = *(float*)(animState + 0x11C);
    float flRunningSpeed = speed / (flMaxMovementSpeed * 0.520f);
    float flDuckingSpeed = speed / (flMaxMovementSpeed * 0.340f);

    flRunningSpeed = clamp(flRunningSpeed, 0.0f, 1.0f);

    float flYawModifier = (((m_flGroundFraction * -0.3f) - 0.2f) * flRunningSpeed) + 1.0f;
    if (flDuckAmount > 0.0f) {
        float flDuckingSpeed = clamp(flDuckingSpeed, 0.0f, 1.0f);
        flYawModifier += (flDuckAmount * flDuckingSpeed) * (0.5f - flYawModifier);
    }

    float flMinBodyYaw = std::fabsf(((float)(uintptr_t(animState) + 0x330)) * flYawModifier);
    float flMaxBodyYaw = std::fabsf(((float)(uintptr_t(animState) + 0x334)) * flYawModifier);

    float flEyeYaw = ent->GetEyeAngles().y;
    float flEyeDiff = std::remainderf(flEyeYaw - m_flFakeGoalFeetYaw[ent->EntIndex()], 360.f);

    if (flEyeDiff <= flMaxBodyYaw) {
        if (flMinBodyYaw > flEyeDiff)
            m_flFakeGoalFeetYaw[ent->EntIndex()] = fabs(flMinBodyYaw) + flEyeYaw;
    }
    else {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = flEyeYaw - fabs(flMaxBodyYaw);
    }

    m_flFakeGoalFeetYaw[ent->EntIndex()] = std::remainderf(m_flFakeGoalFeetYaw[ent->EntIndex()], 360.f);

    if (speed > 0.1f || fabs(velocity.z) > 100.0f) {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = ApproachAngle(
            flEyeYaw,
            m_flFakeGoalFeetYaw[ent->EntIndex()],
            ((m_flGroundFraction * 20.0f) + 30.0f)
            * g_pClientState->m_nChokedCommands);
    }
    else {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = ApproachAngle(
            ent->GetLowerBodyYaw(),
            m_flFakeGoalFeetYaw[ent->EntIndex()],
            g_pClientState->m_nChokedCommands * 100.0f);
    }

    float Left = flEyeYaw + flMinBodyYaw;
    float Right = flEyeYaw + flMaxBodyYaw;

    float resolveYaw;

    switch (Globals::MissedShots[ent->EntIndex()] % 3) {
    case 0: // brute left side
        resolveYaw = Left;
        break;
    case 1: // brute fake side
        resolveYaw = m_flFakeGoalFeetYaw[ent->EntIndex()];
        break;
    case 2: // brute right side
        resolveYaw = Right;
        break;
    default:
        break;
    }

    animState->m_flGoalFeetYaw = resolveYaw;
}

void Resolver::AnimationFix(C_BaseEntity* pEnt)
{
    if (!pEnt || !pEnt->IsAlive() || pEnt == Globals::LocalPlayer || pEnt->GetTeam() == Globals::LocalPlayer->GetTeam())
        return;

    if (!Globals::LocalPlayer || !Globals::LocalPlayer->IsAlive() || !Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->GetActiveWeapon()->GetAmmo() == 0)
        return;

    float* PosParams = (float*)((uintptr_t)pEnt + 0x2774);
    auto* AnimState = pEnt->AnimState();
    if (!AnimState || !pEnt->AnimOverlays() || !PosParams)
        return;

    // backup
    const float curtime = g_pGlobalVars->curtime;
    const float frametime = g_pGlobalVars->frametime;

    g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick;
    g_pGlobalVars->curtime = pEnt->GetSimulationTime();

    int backup_eflags = pEnt->m_iEFlags();

    // SetLocalVelocity
    pEnt->m_iEFlags() &= ~0x1000; // InvalidatePhysicsRecursive(VELOCITY_CHANGED); EFL_DIRTY_ABSVELOCITY = 0x1000
    pEnt->SetAbsVelocity(pEnt->GetVelocity());

    // invalidates prior animations
    if (AnimState->m_iLastClientSideAnimationUpdateFramecount == g_pGlobalVars->framecount)
        AnimState->m_iLastClientSideAnimationUpdateFramecount = g_pGlobalVars->framecount - 1;

    pEnt->ClientAnimations(true);

    // updates local animations + poses + calculates new abs angle based on eyeangles and other stuff
    // call resolver
    proper_brute(pEnt);
    pEnt->UpdateClientAnimation();

    pEnt->ClientAnimations(false);

    // restore
    pEnt->m_iEFlags() = backup_eflags;

    g_pGlobalVars->curtime = curtime;
    g_pGlobalVars->frametime = frametime;

    pEnt->InvalidateBoneCache();
    pEnt->SetupBones(nullptr, -1, 0x7FF00, g_pGlobalVars->curtime);
}

void HandleHits(C_BaseEntity* pEnt)
{
    auto NetChannel = g_pEngine->GetNetChannelInfo();

    if (!NetChannel)
        return;

    static float predTime[65];
    static bool init[65];

    if (Globals::Shot[pEnt->EntIndex()])
    {
        if (init[pEnt->EntIndex()])
        {
            g_Resolver.pitchHit[pEnt->EntIndex()] = pEnt->GetEyeAngles().x;
            predTime[pEnt->EntIndex()] = g_pGlobalVars->curtime + NetChannel->GetAvgLatency(FLOW_INCOMING) + NetChannel->GetAvgLatency(FLOW_OUTGOING) + TICKS_TO_TIME(1) + TICKS_TO_TIME(g_pEngine->GetNetChannel()->m_nChokedPackets);
            init[pEnt->EntIndex()] = false;
        }

        if (g_pGlobalVars->curtime > predTime[pEnt->EntIndex()] && !Globals::Hit[pEnt->EntIndex()])
        {
            Globals::MissedShots[pEnt->EntIndex()] += 1;
            Globals::Shot[pEnt->EntIndex()] = false;
        }
        else if (g_pGlobalVars->curtime <= predTime[pEnt->EntIndex()] && Globals::Hit[pEnt->EntIndex()])
            Globals::Shot[pEnt->EntIndex()] = false;

    }
    else
        init[pEnt->EntIndex()] = true;

    Globals::Hit[pEnt->EntIndex()] = false;
}

void Resolver::OnCreateMove() // cancer v2
{
    if (!c_config::get().aimbot_resolver)
        return;

    if (!Globals::LocalPlayer->IsAlive())
        return;

    if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
        return;


    for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
    {
        C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);

        if (!pPlayerEntity
            || !pPlayerEntity->IsAlive()
            || pPlayerEntity->IsDormant()
            || pPlayerEntity == Globals::LocalPlayer
            || pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
        {
            UseFreestandAngle[i] = false;
            continue;
        }

        if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
            UseFreestandAngle[pPlayerEntity->EntIndex()] = false;

        if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
        {
            bool Autowalled = false, HitSide1 = false, HitSide2 = false;

            float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
            Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);

            Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
            Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };

            Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
            Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };

            Vector Origin = pPlayerEntity->GetOrigin();

            Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };

            Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };

            for (int side = 0; side < 2; side++)
            {
                Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x,  Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
                Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x,  ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };

                if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
                {
                    if (side == 0)
                    {
                        HitSide1 = true;
                        FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                    }
                    else if (side == 1)
                    {
                        HitSide2 = true;
                        FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                    }

                    Autowalled = true;
                }
                else
                {
                    for (int side222 = 0; side222 < 2; side222++)
                    {
                        Vector OriginAutowall222 = { Origin.x + OriginLeftRight[side222].x,  Origin.y - OriginLeftRight[side222].y , Origin.z + 90 };

                        if (g_Autowall.CanHitFloatingPoint(OriginAutowall222, OriginAutowall2))
                        {
                            if (side222 == 0)
                            {
                                HitSide1 = true;
                                FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                            }
                            else if (side222 == 1)
                            {
                                HitSide2 = true;
                                FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                            }

                            Autowalled = true;
                        }
                    }
                }
            }

            if (Autowalled)
            {
                if (HitSide1 && HitSide2)
                    UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
                else
                    UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
            }
        }
    }
}

void Resolver::FrameStage(ClientFrameStage_t stage)
{
    if (!Globals::LocalPlayer || !g_pEngine->IsInGame())
        return;

    static bool  wasDormant[65];

    for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
    {
        C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);

        if (!pPlayerEntity
            || !pPlayerEntity->IsAlive())
            continue;
        if (pPlayerEntity->IsDormant())
        {
            wasDormant[i] = true;
            continue;
        }

        if (stage == FRAME_RENDER_START)
        {
            HandleHits(pPlayerEntity);
            proper_brute(pPlayerEntity);
            AnimationFix(pPlayerEntity);
        }

        if (stage == FRAME_NET_UPDATE_END && pPlayerEntity != Globals::LocalPlayer)
        {
            auto VarMap = reinterpret_cast<uintptr_t>(pPlayerEntity) + 36;
            auto VarMapSize = *reinterpret_cast<int*>(VarMap + 20);

            for (auto index = 0; index < VarMapSize; index++)
                *reinterpret_cast<uintptr_t*>(*reinterpret_cast<uintptr_t*>(VarMap) + index * 12) = 0;
        }

        wasDormant[i] = false;
    }//
}
UPD : если у вас ошибка с m_iEFlags() , в CEntity.h вставьте этот код:
C++:
uint32_t& m_iEFlags()
    {
        static unsigned int _m_iEFlags = g_pNetvars->GetOffset("DT_BasePlayer", "m_fFlags");
        return *(uint32_t*)((uintptr_t)this + _m_iEFlags);
    }
 
Последнее редактирование:
[COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTR
Забаненный
Статус
Оффлайн
Регистрация
6 Май 2020
Сообщения
81
Реакции[?]
25
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
EVOLUTION ?
Забаненный
Статус
Оффлайн
Регистрация
30 Июл 2019
Сообщения
1,162
Реакции[?]
269
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Начинающий
Статус
Оффлайн
Регистрация
16 Апр 2020
Сообщения
3
Реакции[?]
1
Поинты[?]
0
Всем привет, недавно заметил, что очень много людей хвалят ресольвер икфакофа, сделал его под ху0.
credits: to ikfakof

код без антипасты, в дефолтном ху0 все это есть.
TODO: проверка на бота.

C++:
#include "Resolver.h"
#include "..\Aimbot\Aimbot.h"
#include "..\Aimbot\Autowall.h"
#include "..\Aimbot\LagComp.h"
#include "..\..\Utils\Utils.h"
#include "..\..\SDK\IVEngineClient.h"
#include "..\..\SDK\Hitboxes.h"
#include "..\..\SDK\PlayerInfo.h"
#include "..\..\Utils\Math.h"
#include "..\..\Menu\Menu.h"
#include "..\..\Menu\config.h"
#include "..\..\SDK\CEntity.h"
#include "..\..\SDK\IBaseClientDll.h"

Resolver g_Resolver;

template<class T, class U>
inline T clamp(T in, U low, U high)
{
    if (in <= low)
        return low;
    else if (in >= high)
        return high;
    else
        return in;
}

void BotCheck(C_BaseEntity* ent)
{

}

static auto GetSmoothedVelocity = [](float min_delta, Vector a, Vector b) {
    Vector delta = a - b;
    float delta_length = delta.Length();

    if (delta_length <= min_delta) {
        Vector result;
        if (-min_delta <= delta_length) {
            return a;
        }
        else {
            float iradius = 1.0f / (delta_length + FLT_EPSILON);
            return b - ((delta * iradius) * min_delta);
        }
    }
    else {
        float iradius = 1.0f / (delta_length + FLT_EPSILON);
        return b + ((delta * iradius) * min_delta);
    }
};

float AngleNormalize(float angle)
{
    angle = fmodf(angle, 360.0f);
    if (angle > 180)
    {
        angle -= 360;
    }
    if (angle < -180)
    {
        angle += 360;
    }
    return angle;
}

float ApproachAngle(float target, float value, float speed)
{
    target = (target * 182.04445f) * 0.0054931641f;
    value = (value * 182.04445f) * 0.0054931641f;

    float delta = target - value;

    // Speed is assumed to be positive
    if (speed < 0)
        speed = -speed;

    if (delta < -180.0f)
        delta += 360.0f;
    else if (delta > 180.0f)
        delta -= 360.0f;

    if (delta > speed)
        value += speed;
    else if (delta < -speed)
        value -= speed;
    else
        value = target;

    return value;
}

void proper_brute(C_BaseEntity* ent)
{
    if (!Globals::LocalPlayer->IsAlive())
        return;

    auto animState = ent->AnimState();
    float m_flFakeGoalFeetYaw[65];
    // Rebuild setup velocity to receive flMinBodyYaw and flMaxBodyYaw
    Vector velocity = ent->GetVelocity();
    float spd = velocity.LengthSqr();
    if (spd > std::powf(1.2f * 260.0f, 2.f)) {
        Vector velocity_normalized = velocity.Normalize();
        velocity = velocity_normalized * (1.2f * 260.0f);
    }

    float v25 = clamp(ent->m_fDuckSpeed() + animState->m_fLandingDuckAdditiveSomething, 0.0f, 1.0f);
    float v26 = animState->m_fDuckAmount;
    float v27 = g_pClientState->m_nChokedCommands * 6.0f;
    float v28;

    // clamp
    if ((v25 - v26) <= v27) {
        if (-v27 <= (v25 - v26))
            v28 = v25;
        else
            v28 = v26 - v27;
    }
    else {
        v28 = v26 + v27;
    }

    float flDuckAmount = clamp(v28, 0.0f, 1.0f);

    Vector animationVelocity = GetSmoothedVelocity(g_pClientState->m_nChokedCommands * 2000.0f, velocity, ent->GetVelocity());
    float speed = std::fminf(animationVelocity.Length(), 260.0f);

    auto weapon = ent->GetActiveWeapon();

    float flMaxMovementSpeed = 260.0f;
    if (weapon) {
        flMaxMovementSpeed = std::fmaxf(weapon->GetCSWpnData()->max_speed, 0.001f);
    }
    float m_flGroundFraction = *(float*)(animState + 0x11C);
    float flRunningSpeed = speed / (flMaxMovementSpeed * 0.520f);
    float flDuckingSpeed = speed / (flMaxMovementSpeed * 0.340f);

    flRunningSpeed = clamp(flRunningSpeed, 0.0f, 1.0f);

    float flYawModifier = (((m_flGroundFraction * -0.3f) - 0.2f) * flRunningSpeed) + 1.0f;
    if (flDuckAmount > 0.0f) {
        float flDuckingSpeed = clamp(flDuckingSpeed, 0.0f, 1.0f);
        flYawModifier += (flDuckAmount * flDuckingSpeed) * (0.5f - flYawModifier);
    }

    float flMinBodyYaw = std::fabsf(((float)(uintptr_t(animState) + 0x330)) * flYawModifier);
    float flMaxBodyYaw = std::fabsf(((float)(uintptr_t(animState) + 0x334)) * flYawModifier);

    float flEyeYaw = ent->GetEyeAngles().y;
    float flEyeDiff = std::remainderf(flEyeYaw - m_flFakeGoalFeetYaw[ent->EntIndex()], 360.f);

    if (flEyeDiff <= flMaxBodyYaw) {
        if (flMinBodyYaw > flEyeDiff)
            m_flFakeGoalFeetYaw[ent->EntIndex()] = fabs(flMinBodyYaw) + flEyeYaw;
    }
    else {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = flEyeYaw - fabs(flMaxBodyYaw);
    }

    m_flFakeGoalFeetYaw[ent->EntIndex()] = std::remainderf(m_flFakeGoalFeetYaw[ent->EntIndex()], 360.f);

    if (speed > 0.1f || fabs(velocity.z) > 100.0f) {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = ApproachAngle(
            flEyeYaw,
            m_flFakeGoalFeetYaw[ent->EntIndex()],
            ((m_flGroundFraction * 20.0f) + 30.0f)
            * g_pClientState->m_nChokedCommands);
    }
    else {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = ApproachAngle(
            ent->GetLowerBodyYaw(),
            m_flFakeGoalFeetYaw[ent->EntIndex()],
            g_pClientState->m_nChokedCommands * 100.0f);
    }

    float Left = flEyeYaw + flMinBodyYaw;
    float Right = flEyeYaw + flMaxBodyYaw;

    float resolveYaw;

    switch (Globals::MissedShots[ent->EntIndex()] % 3) {
    case 0: // brute left side
        resolveYaw = Left;
        break;
    case 1: // brute fake side
        resolveYaw = m_flFakeGoalFeetYaw[ent->EntIndex()];
        break;
    case 2: // brute right side
        resolveYaw = Right;
        break;
    default:
        break;
    }

    animState->m_flGoalFeetYaw = resolveYaw;
}

void Resolver::AnimationFix(C_BaseEntity* pEnt)
{
    if (!pEnt || !pEnt->IsAlive() || pEnt == Globals::LocalPlayer || pEnt->GetTeam() == Globals::LocalPlayer->GetTeam())
        return;

    if (!Globals::LocalPlayer || !Globals::LocalPlayer->IsAlive() || !Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->GetActiveWeapon()->GetAmmo() == 0)
        return;

    float* PosParams = (float*)((uintptr_t)pEnt + 0x2774);
    auto* AnimState = pEnt->AnimState();
    if (!AnimState || !pEnt->AnimOverlays() || !PosParams)
        return;

    // backup
    const float curtime = g_pGlobalVars->curtime;
    const float frametime = g_pGlobalVars->frametime;

    g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick;
    g_pGlobalVars->curtime = pEnt->GetSimulationTime();

    int backup_eflags = pEnt->m_iEFlags();

    // SetLocalVelocity
    pEnt->m_iEFlags() &= ~0x1000; // InvalidatePhysicsRecursive(VELOCITY_CHANGED); EFL_DIRTY_ABSVELOCITY = 0x1000
    pEnt->SetAbsVelocity(pEnt->GetVelocity());

    // invalidates prior animations
    if (AnimState->m_iLastClientSideAnimationUpdateFramecount == g_pGlobalVars->framecount)
        AnimState->m_iLastClientSideAnimationUpdateFramecount = g_pGlobalVars->framecount - 1;

    pEnt->ClientAnimations(true);

    // updates local animations + poses + calculates new abs angle based on eyeangles and other stuff
    // call resolver
    proper_brute(pEnt);
    pEnt->UpdateClientAnimation();

    pEnt->ClientAnimations(false);

    // restore
    pEnt->m_iEFlags() = backup_eflags;

    g_pGlobalVars->curtime = curtime;
    g_pGlobalVars->frametime = frametime;

    pEnt->InvalidateBoneCache();
    pEnt->SetupBones(nullptr, -1, 0x7FF00, g_pGlobalVars->curtime);
}

void HandleHits(C_BaseEntity* pEnt)
{
    auto NetChannel = g_pEngine->GetNetChannelInfo();

    if (!NetChannel)
        return;

    static float predTime[65];
    static bool init[65];

    if (Globals::Shot[pEnt->EntIndex()])
    {
        if (init[pEnt->EntIndex()])
        {
            g_Resolver.pitchHit[pEnt->EntIndex()] = pEnt->GetEyeAngles().x;
            predTime[pEnt->EntIndex()] = g_pGlobalVars->curtime + NetChannel->GetAvgLatency(FLOW_INCOMING) + NetChannel->GetAvgLatency(FLOW_OUTGOING) + TICKS_TO_TIME(1) + TICKS_TO_TIME(g_pEngine->GetNetChannel()->m_nChokedPackets);
            init[pEnt->EntIndex()] = false;
        }

        if (g_pGlobalVars->curtime > predTime[pEnt->EntIndex()] && !Globals::Hit[pEnt->EntIndex()])
        {
            Globals::MissedShots[pEnt->EntIndex()] += 1;
            Globals::Shot[pEnt->EntIndex()] = false;
        }
        else if (g_pGlobalVars->curtime <= predTime[pEnt->EntIndex()] && Globals::Hit[pEnt->EntIndex()])
            Globals::Shot[pEnt->EntIndex()] = false;

    }
    else
        init[pEnt->EntIndex()] = true;

    Globals::Hit[pEnt->EntIndex()] = false;
}

void Resolver::OnCreateMove() // cancer v2
{
    if (!c_config::get().aimbot_resolver)
        return;

    if (!Globals::LocalPlayer->IsAlive())
        return;

    if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
        return;


    for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
    {
        C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);

        if (!pPlayerEntity
            || !pPlayerEntity->IsAlive()
            || pPlayerEntity->IsDormant()
            || pPlayerEntity == Globals::LocalPlayer
            || pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
        {
            UseFreestandAngle[i] = false;
            continue;
        }

        if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
            UseFreestandAngle[pPlayerEntity->EntIndex()] = false;

        if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
        {
            bool Autowalled = false, HitSide1 = false, HitSide2 = false;

            float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
            Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);

            Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
            Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };

            Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
            Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };

            Vector Origin = pPlayerEntity->GetOrigin();

            Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };

            Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };

            for (int side = 0; side < 2; side++)
            {
                Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x,  Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
                Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x,  ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };

                if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
                {
                    if (side == 0)
                    {
                        HitSide1 = true;
                        FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                    }
                    else if (side == 1)
                    {
                        HitSide2 = true;
                        FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                    }

                    Autowalled = true;
                }
                else
                {
                    for (int side222 = 0; side222 < 2; side222++)
                    {
                        Vector OriginAutowall222 = { Origin.x + OriginLeftRight[side222].x,  Origin.y - OriginLeftRight[side222].y , Origin.z + 90 };

                        if (g_Autowall.CanHitFloatingPoint(OriginAutowall222, OriginAutowall2))
                        {
                            if (side222 == 0)
                            {
                                HitSide1 = true;
                                FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                            }
                            else if (side222 == 1)
                            {
                                HitSide2 = true;
                                FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                            }

                            Autowalled = true;
                        }
                    }
                }
            }

            if (Autowalled)
            {
                if (HitSide1 && HitSide2)
                    UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
                else
                    UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
            }
        }
    }
}

void Resolver::FrameStage(ClientFrameStage_t stage)
{
    if (!Globals::LocalPlayer || !g_pEngine->IsInGame())
        return;

    static bool  wasDormant[65];

    for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
    {
        C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);

        if (!pPlayerEntity
            || !pPlayerEntity->IsAlive())
            continue;
        if (pPlayerEntity->IsDormant())
        {
            wasDormant[i] = true;
            continue;
        }

        if (stage == FRAME_RENDER_START)
        {
            HandleHits(pPlayerEntity);
            AnimationFix(pPlayerEntity);
        }

        if (stage == FRAME_NET_UPDATE_END && pPlayerEntity != Globals::LocalPlayer)
        {
            auto VarMap = reinterpret_cast<uintptr_t>(pPlayerEntity) + 36;
            auto VarMapSize = *reinterpret_cast<int*>(VarMap + 20);

            for (auto index = 0; index < VarMapSize; index++)
                *reinterpret_cast<uintptr_t*>(*reinterpret_cast<uintptr_t*>(VarMap) + index * 12) = 0;
        }

        wasDormant[i] = false;
    }//
}
UPD : если у вас ошибка с m_iEFlags() , в CEntity.h вставьте этот код:
C++:
uint32_t& m_iEFlags()
    {
        static unsigned int _m_iEFlags = g_pNetvars->GetOffset("DT_BasePlayer", "m_fFlags");
        return *(uint32_t*)((uintptr_t)this + _m_iEFlags);
    }
Where is
proper_brute(pPlayerEntity) in your frame_Render_start? nice anti paste, you're not resolving anything, only fixing the anims and the handle hits
 
Vortyk back
Забаненный
Статус
Оффлайн
Регистрация
15 Сен 2019
Сообщения
137
Реакции[?]
28
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
А вот это годно автор красавчик,хоть что-то годное :LUL::seemsgood:
 
Dreammmless.
Эксперт
Статус
Оффлайн
Регистрация
19 Мар 2019
Сообщения
2,956
Реакции[?]
962
Поинты[?]
1K
[COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTR
Забаненный
Статус
Оффлайн
Регистрация
6 Май 2020
Сообщения
81
Реакции[?]
25
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
жаль только ramzi уже его выкладывал давно но пох
тут буквально 5 миллиграмм изменений
почему вы сравниваете этот ресольвер и тот?
у них абсолютно разная логика + тут еще идет тот анимфикс, что икфакоф выкладывал на юц
 
[COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTR
Забаненный
Статус
Оффлайн
Регистрация
6 Май 2020
Сообщения
81
Реакции[?]
25
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
ima sippin lean
Забаненный
Статус
Оффлайн
Регистрация
6 Май 2020
Сообщения
495
Реакции[?]
380
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Всем привет, недавно заметил, что очень много людей хвалят ресольвер икфакофа, сделал его под ху0.
credits: to ikfakof

код без антипасты, в дефолтном ху0 все это есть.
TODO: проверка на бота.

C++:
#include "Resolver.h"
#include "..\Aimbot\Aimbot.h"
#include "..\Aimbot\Autowall.h"
#include "..\Aimbot\LagComp.h"
#include "..\..\Utils\Utils.h"
#include "..\..\SDK\IVEngineClient.h"
#include "..\..\SDK\Hitboxes.h"
#include "..\..\SDK\PlayerInfo.h"
#include "..\..\Utils\Math.h"
#include "..\..\Menu\Menu.h"
#include "..\..\Menu\config.h"
#include "..\..\SDK\CEntity.h"
#include "..\..\SDK\IBaseClientDll.h"

Resolver g_Resolver;

template<class T, class U>
inline T clamp(T in, U low, U high)
{
    if (in <= low)
        return low;
    else if (in >= high)
        return high;
    else
        return in;
}

void BotCheck(C_BaseEntity* ent)
{

}

static auto GetSmoothedVelocity = [](float min_delta, Vector a, Vector b) {
    Vector delta = a - b;
    float delta_length = delta.Length();

    if (delta_length <= min_delta) {
        Vector result;
        if (-min_delta <= delta_length) {
            return a;
        }
        else {
            float iradius = 1.0f / (delta_length + FLT_EPSILON);
            return b - ((delta * iradius) * min_delta);
        }
    }
    else {
        float iradius = 1.0f / (delta_length + FLT_EPSILON);
        return b + ((delta * iradius) * min_delta);
    }
};

float AngleNormalize(float angle)
{
    angle = fmodf(angle, 360.0f);
    if (angle > 180)
    {
        angle -= 360;
    }
    if (angle < -180)
    {
        angle += 360;
    }
    return angle;
}

float ApproachAngle(float target, float value, float speed)
{
    target = (target * 182.04445f) * 0.0054931641f;
    value = (value * 182.04445f) * 0.0054931641f;

    float delta = target - value;

    // Speed is assumed to be positive
    if (speed < 0)
        speed = -speed;

    if (delta < -180.0f)
        delta += 360.0f;
    else if (delta > 180.0f)
        delta -= 360.0f;

    if (delta > speed)
        value += speed;
    else if (delta < -speed)
        value -= speed;
    else
        value = target;

    return value;
}

void proper_brute(C_BaseEntity* ent)
{
    if (!Globals::LocalPlayer->IsAlive())
        return;

    auto animState = ent->AnimState();
    float m_flFakeGoalFeetYaw[65];
    // Rebuild setup velocity to receive flMinBodyYaw and flMaxBodyYaw
    Vector velocity = ent->GetVelocity();
    float spd = velocity.LengthSqr();
    if (spd > std::powf(1.2f * 260.0f, 2.f)) {
        Vector velocity_normalized = velocity.Normalize();
        velocity = velocity_normalized * (1.2f * 260.0f);
    }

    float v25 = clamp(ent->m_fDuckSpeed() + animState->m_fLandingDuckAdditiveSomething, 0.0f, 1.0f);
    float v26 = animState->m_fDuckAmount;
    float v27 = g_pClientState->m_nChokedCommands * 6.0f;
    float v28;

    // clamp
    if ((v25 - v26) <= v27) {
        if (-v27 <= (v25 - v26))
            v28 = v25;
        else
            v28 = v26 - v27;
    }
    else {
        v28 = v26 + v27;
    }

    float flDuckAmount = clamp(v28, 0.0f, 1.0f);

    Vector animationVelocity = GetSmoothedVelocity(g_pClientState->m_nChokedCommands * 2000.0f, velocity, ent->GetVelocity());
    float speed = std::fminf(animationVelocity.Length(), 260.0f);

    auto weapon = ent->GetActiveWeapon();

    float flMaxMovementSpeed = 260.0f;
    if (weapon) {
        flMaxMovementSpeed = std::fmaxf(weapon->GetCSWpnData()->max_speed, 0.001f);
    }
    float m_flGroundFraction = *(float*)(animState + 0x11C);
    float flRunningSpeed = speed / (flMaxMovementSpeed * 0.520f);
    float flDuckingSpeed = speed / (flMaxMovementSpeed * 0.340f);

    flRunningSpeed = clamp(flRunningSpeed, 0.0f, 1.0f);

    float flYawModifier = (((m_flGroundFraction * -0.3f) - 0.2f) * flRunningSpeed) + 1.0f;
    if (flDuckAmount > 0.0f) {
        float flDuckingSpeed = clamp(flDuckingSpeed, 0.0f, 1.0f);
        flYawModifier += (flDuckAmount * flDuckingSpeed) * (0.5f - flYawModifier);
    }

    float flMinBodyYaw = std::fabsf(((float)(uintptr_t(animState) + 0x330)) * flYawModifier);
    float flMaxBodyYaw = std::fabsf(((float)(uintptr_t(animState) + 0x334)) * flYawModifier);

    float flEyeYaw = ent->GetEyeAngles().y;
    float flEyeDiff = std::remainderf(flEyeYaw - m_flFakeGoalFeetYaw[ent->EntIndex()], 360.f);

    if (flEyeDiff <= flMaxBodyYaw) {
        if (flMinBodyYaw > flEyeDiff)
            m_flFakeGoalFeetYaw[ent->EntIndex()] = fabs(flMinBodyYaw) + flEyeYaw;
    }
    else {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = flEyeYaw - fabs(flMaxBodyYaw);
    }

    m_flFakeGoalFeetYaw[ent->EntIndex()] = std::remainderf(m_flFakeGoalFeetYaw[ent->EntIndex()], 360.f);

    if (speed > 0.1f || fabs(velocity.z) > 100.0f) {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = ApproachAngle(
            flEyeYaw,
            m_flFakeGoalFeetYaw[ent->EntIndex()],
            ((m_flGroundFraction * 20.0f) + 30.0f)
            * g_pClientState->m_nChokedCommands);
    }
    else {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = ApproachAngle(
            ent->GetLowerBodyYaw(),
            m_flFakeGoalFeetYaw[ent->EntIndex()],
            g_pClientState->m_nChokedCommands * 100.0f);
    }

    float Left = flEyeYaw + flMinBodyYaw;
    float Right = flEyeYaw + flMaxBodyYaw;

    float resolveYaw;

    switch (Globals::MissedShots[ent->EntIndex()] % 3) {
    case 0: // brute left side
        resolveYaw = Left;
        break;
    case 1: // brute fake side
        resolveYaw = m_flFakeGoalFeetYaw[ent->EntIndex()];
        break;
    case 2: // brute right side
        resolveYaw = Right;
        break;
    default:
        break;
    }

    animState->m_flGoalFeetYaw = resolveYaw;
}

void Resolver::AnimationFix(C_BaseEntity* pEnt)
{
    if (!pEnt || !pEnt->IsAlive() || pEnt == Globals::LocalPlayer || pEnt->GetTeam() == Globals::LocalPlayer->GetTeam())
        return;

    if (!Globals::LocalPlayer || !Globals::LocalPlayer->IsAlive() || !Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->GetActiveWeapon()->GetAmmo() == 0)
        return;

    float* PosParams = (float*)((uintptr_t)pEnt + 0x2774);
    auto* AnimState = pEnt->AnimState();
    if (!AnimState || !pEnt->AnimOverlays() || !PosParams)
        return;

    // backup
    const float curtime = g_pGlobalVars->curtime;
    const float frametime = g_pGlobalVars->frametime;

    g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick;
    g_pGlobalVars->curtime = pEnt->GetSimulationTime();

    int backup_eflags = pEnt->m_iEFlags();

    // SetLocalVelocity
    pEnt->m_iEFlags() &= ~0x1000; // InvalidatePhysicsRecursive(VELOCITY_CHANGED); EFL_DIRTY_ABSVELOCITY = 0x1000
    pEnt->SetAbsVelocity(pEnt->GetVelocity());

    // invalidates prior animations
    if (AnimState->m_iLastClientSideAnimationUpdateFramecount == g_pGlobalVars->framecount)
        AnimState->m_iLastClientSideAnimationUpdateFramecount = g_pGlobalVars->framecount - 1;

    pEnt->ClientAnimations(true);

    // updates local animations + poses + calculates new abs angle based on eyeangles and other stuff
    // call resolver
    proper_brute(pEnt);
    pEnt->UpdateClientAnimation();

    pEnt->ClientAnimations(false);

    // restore
    pEnt->m_iEFlags() = backup_eflags;

    g_pGlobalVars->curtime = curtime;
    g_pGlobalVars->frametime = frametime;

    pEnt->InvalidateBoneCache();
    pEnt->SetupBones(nullptr, -1, 0x7FF00, g_pGlobalVars->curtime);
}

void HandleHits(C_BaseEntity* pEnt)
{
    auto NetChannel = g_pEngine->GetNetChannelInfo();

    if (!NetChannel)
        return;

    static float predTime[65];
    static bool init[65];

    if (Globals::Shot[pEnt->EntIndex()])
    {
        if (init[pEnt->EntIndex()])
        {
            g_Resolver.pitchHit[pEnt->EntIndex()] = pEnt->GetEyeAngles().x;
            predTime[pEnt->EntIndex()] = g_pGlobalVars->curtime + NetChannel->GetAvgLatency(FLOW_INCOMING) + NetChannel->GetAvgLatency(FLOW_OUTGOING) + TICKS_TO_TIME(1) + TICKS_TO_TIME(g_pEngine->GetNetChannel()->m_nChokedPackets);
            init[pEnt->EntIndex()] = false;
        }

        if (g_pGlobalVars->curtime > predTime[pEnt->EntIndex()] && !Globals::Hit[pEnt->EntIndex()])
        {
            Globals::MissedShots[pEnt->EntIndex()] += 1;
            Globals::Shot[pEnt->EntIndex()] = false;
        }
        else if (g_pGlobalVars->curtime <= predTime[pEnt->EntIndex()] && Globals::Hit[pEnt->EntIndex()])
            Globals::Shot[pEnt->EntIndex()] = false;

    }
    else
        init[pEnt->EntIndex()] = true;

    Globals::Hit[pEnt->EntIndex()] = false;
}

void Resolver::OnCreateMove() // cancer v2
{
    if (!c_config::get().aimbot_resolver)
        return;

    if (!Globals::LocalPlayer->IsAlive())
        return;

    if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
        return;


    for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
    {
        C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);

        if (!pPlayerEntity
            || !pPlayerEntity->IsAlive()
            || pPlayerEntity->IsDormant()
            || pPlayerEntity == Globals::LocalPlayer
            || pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
        {
            UseFreestandAngle[i] = false;
            continue;
        }

        if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
            UseFreestandAngle[pPlayerEntity->EntIndex()] = false;

        if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
        {
            bool Autowalled = false, HitSide1 = false, HitSide2 = false;

            float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
            Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);

            Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
            Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };

            Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
            Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };

            Vector Origin = pPlayerEntity->GetOrigin();

            Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };

            Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };

            for (int side = 0; side < 2; side++)
            {
                Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x,  Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
                Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x,  ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };

                if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
                {
                    if (side == 0)
                    {
                        HitSide1 = true;
                        FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                    }
                    else if (side == 1)
                    {
                        HitSide2 = true;
                        FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                    }

                    Autowalled = true;
                }
                else
                {
                    for (int side222 = 0; side222 < 2; side222++)
                    {
                        Vector OriginAutowall222 = { Origin.x + OriginLeftRight[side222].x,  Origin.y - OriginLeftRight[side222].y , Origin.z + 90 };

                        if (g_Autowall.CanHitFloatingPoint(OriginAutowall222, OriginAutowall2))
                        {
                            if (side222 == 0)
                            {
                                HitSide1 = true;
                                FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                            }
                            else if (side222 == 1)
                            {
                                HitSide2 = true;
                                FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                            }

                            Autowalled = true;
                        }
                    }
                }
            }

            if (Autowalled)
            {
                if (HitSide1 && HitSide2)
                    UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
                else
                    UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
            }
        }
    }
}

void Resolver::FrameStage(ClientFrameStage_t stage)
{
    if (!Globals::LocalPlayer || !g_pEngine->IsInGame())
        return;

    static bool  wasDormant[65];

    for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
    {
        C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);

        if (!pPlayerEntity
            || !pPlayerEntity->IsAlive())
            continue;
        if (pPlayerEntity->IsDormant())
        {
            wasDormant[i] = true;
            continue;
        }

        if (stage == FRAME_RENDER_START)
        {
            HandleHits(pPlayerEntity);
            proper_brute(pPlayerEntity);
            AnimationFix(pPlayerEntity);
        }

        if (stage == FRAME_NET_UPDATE_END && pPlayerEntity != Globals::LocalPlayer)
        {
            auto VarMap = reinterpret_cast<uintptr_t>(pPlayerEntity) + 36;
            auto VarMapSize = *reinterpret_cast<int*>(VarMap + 20);

            for (auto index = 0; index < VarMapSize; index++)
                *reinterpret_cast<uintptr_t*>(*reinterpret_cast<uintptr_t*>(VarMap) + index * 12) = 0;
        }

        wasDormant[i] = false;
    }//
}
UPD : если у вас ошибка с m_iEFlags() , в CEntity.h вставьте этот код:
C++:
uint32_t& m_iEFlags()
    {
        static unsigned int _m_iEFlags = g_pNetvars->GetOffset("DT_BasePlayer", "m_fFlags");
        return *(uint32_t*)((uintptr_t)this + _m_iEFlags);
    }
ya konechnto ne big coder, no chokedcommands != chokedtime
 
Забаненный
Статус
Оффлайн
Регистрация
15 Мар 2020
Сообщения
81
Реакции[?]
13
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
void BotCheck(iGameEvent* event)
{
player_info_t playerInfo;
int index = g_pEngine->GetPlayerForUserID(event->GetInt("userid"));
if (!Interfaces::Engine->GetPlayerInfo(index, &pInfo))
    return;

if (pInfo.fakeplayer)
    return;
}
проверка на бота бай неверминд + подгон чтобы впастить в 2 кнопки
хотя надо наверно прописать отключение ресика на ботах чи нет
я 0 iq пастер бтв
 
aspire to inspire
Пользователь
Статус
Оффлайн
Регистрация
4 Июн 2019
Сообщения
236
Реакции[?]
42
Поинты[?]
0
Не понимаю почему, меню только появляется (не полностью даже) и крашит, как исправить подскажите?
 
main public enemy
Эксперт
Статус
Оффлайн
Регистрация
30 Ноя 2019
Сообщения
1,531
Реакции[?]
647
Поинты[?]
0
Всем привет, недавно заметил, что очень много людей хвалят ресольвер икфакофа, сделал его под ху0.
credits: to ikfakof

код без антипасты, в дефолтном ху0 все это есть.
TODO: проверка на бота.

C++:
#include "Resolver.h"
#include "..\Aimbot\Aimbot.h"
#include "..\Aimbot\Autowall.h"
#include "..\Aimbot\LagComp.h"
#include "..\..\Utils\Utils.h"
#include "..\..\SDK\IVEngineClient.h"
#include "..\..\SDK\Hitboxes.h"
#include "..\..\SDK\PlayerInfo.h"
#include "..\..\Utils\Math.h"
#include "..\..\Menu\Menu.h"
#include "..\..\Menu\config.h"
#include "..\..\SDK\CEntity.h"
#include "..\..\SDK\IBaseClientDll.h"

Resolver g_Resolver;

template<class T, class U>
inline T clamp(T in, U low, U high)
{
    if (in <= low)
        return low;
    else if (in >= high)
        return high;
    else
        return in;
}

void BotCheck(C_BaseEntity* ent)
{

}

static auto GetSmoothedVelocity = [](float min_delta, Vector a, Vector b) {
    Vector delta = a - b;
    float delta_length = delta.Length();

    if (delta_length <= min_delta) {
        Vector result;
        if (-min_delta <= delta_length) {
            return a;
        }
        else {
            float iradius = 1.0f / (delta_length + FLT_EPSILON);
            return b - ((delta * iradius) * min_delta);
        }
    }
    else {
        float iradius = 1.0f / (delta_length + FLT_EPSILON);
        return b + ((delta * iradius) * min_delta);
    }
};

float AngleNormalize(float angle)
{
    angle = fmodf(angle, 360.0f);
    if (angle > 180)
    {
        angle -= 360;
    }
    if (angle < -180)
    {
        angle += 360;
    }
    return angle;
}

float ApproachAngle(float target, float value, float speed)
{
    target = (target * 182.04445f) * 0.0054931641f;
    value = (value * 182.04445f) * 0.0054931641f;

    float delta = target - value;

    // Speed is assumed to be positive
    if (speed < 0)
        speed = -speed;

    if (delta < -180.0f)
        delta += 360.0f;
    else if (delta > 180.0f)
        delta -= 360.0f;

    if (delta > speed)
        value += speed;
    else if (delta < -speed)
        value -= speed;
    else
        value = target;

    return value;
}

void proper_brute(C_BaseEntity* ent)
{
    if (!Globals::LocalPlayer->IsAlive())
        return;

    auto animState = ent->AnimState();
    float m_flFakeGoalFeetYaw[65];
    // Rebuild setup velocity to receive flMinBodyYaw and flMaxBodyYaw
    Vector velocity = ent->GetVelocity();
    float spd = velocity.LengthSqr();
    if (spd > std::powf(1.2f * 260.0f, 2.f)) {
        Vector velocity_normalized = velocity.Normalize();
        velocity = velocity_normalized * (1.2f * 260.0f);
    }

    float v25 = clamp(ent->m_fDuckSpeed() + animState->m_fLandingDuckAdditiveSomething, 0.0f, 1.0f);
    float v26 = animState->m_fDuckAmount;
    float v27 = g_pClientState->m_nChokedCommands * 6.0f;
    float v28;

    // clamp
    if ((v25 - v26) <= v27) {
        if (-v27 <= (v25 - v26))
            v28 = v25;
        else
            v28 = v26 - v27;
    }
    else {
        v28 = v26 + v27;
    }

    float flDuckAmount = clamp(v28, 0.0f, 1.0f);

    Vector animationVelocity = GetSmoothedVelocity(g_pClientState->m_nChokedCommands * 2000.0f, velocity, ent->GetVelocity());
    float speed = std::fminf(animationVelocity.Length(), 260.0f);

    auto weapon = ent->GetActiveWeapon();

    float flMaxMovementSpeed = 260.0f;
    if (weapon) {
        flMaxMovementSpeed = std::fmaxf(weapon->GetCSWpnData()->max_speed, 0.001f);
    }
    float m_flGroundFraction = *(float*)(animState + 0x11C);
    float flRunningSpeed = speed / (flMaxMovementSpeed * 0.520f);
    float flDuckingSpeed = speed / (flMaxMovementSpeed * 0.340f);

    flRunningSpeed = clamp(flRunningSpeed, 0.0f, 1.0f);

    float flYawModifier = (((m_flGroundFraction * -0.3f) - 0.2f) * flRunningSpeed) + 1.0f;
    if (flDuckAmount > 0.0f) {
        float flDuckingSpeed = clamp(flDuckingSpeed, 0.0f, 1.0f);
        flYawModifier += (flDuckAmount * flDuckingSpeed) * (0.5f - flYawModifier);
    }

    float flMinBodyYaw = std::fabsf(((float)(uintptr_t(animState) + 0x330)) * flYawModifier);
    float flMaxBodyYaw = std::fabsf(((float)(uintptr_t(animState) + 0x334)) * flYawModifier);

    float flEyeYaw = ent->GetEyeAngles().y;
    float flEyeDiff = std::remainderf(flEyeYaw - m_flFakeGoalFeetYaw[ent->EntIndex()], 360.f);

    if (flEyeDiff <= flMaxBodyYaw) {
        if (flMinBodyYaw > flEyeDiff)
            m_flFakeGoalFeetYaw[ent->EntIndex()] = fabs(flMinBodyYaw) + flEyeYaw;
    }
    else {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = flEyeYaw - fabs(flMaxBodyYaw);
    }

    m_flFakeGoalFeetYaw[ent->EntIndex()] = std::remainderf(m_flFakeGoalFeetYaw[ent->EntIndex()], 360.f);

    if (speed > 0.1f || fabs(velocity.z) > 100.0f) {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = ApproachAngle(
            flEyeYaw,
            m_flFakeGoalFeetYaw[ent->EntIndex()],
            ((m_flGroundFraction * 20.0f) + 30.0f)
            * g_pClientState->m_nChokedCommands);
    }
    else {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = ApproachAngle(
            ent->GetLowerBodyYaw(),
            m_flFakeGoalFeetYaw[ent->EntIndex()],
            g_pClientState->m_nChokedCommands * 100.0f);
    }

    float Left = flEyeYaw + flMinBodyYaw;
    float Right = flEyeYaw + flMaxBodyYaw;

    float resolveYaw;

    switch (Globals::MissedShots[ent->EntIndex()] % 3) {
    case 0: // brute left side
        resolveYaw = Left;
        break;
    case 1: // brute fake side
        resolveYaw = m_flFakeGoalFeetYaw[ent->EntIndex()];
        break;
    case 2: // brute right side
        resolveYaw = Right;
        break;
    default:
        break;
    }

    animState->m_flGoalFeetYaw = resolveYaw;
}

void Resolver::AnimationFix(C_BaseEntity* pEnt)
{
    if (!pEnt || !pEnt->IsAlive() || pEnt == Globals::LocalPlayer || pEnt->GetTeam() == Globals::LocalPlayer->GetTeam())
        return;

    if (!Globals::LocalPlayer || !Globals::LocalPlayer->IsAlive() || !Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->GetActiveWeapon()->GetAmmo() == 0)
        return;

    float* PosParams = (float*)((uintptr_t)pEnt + 0x2774);
    auto* AnimState = pEnt->AnimState();
    if (!AnimState || !pEnt->AnimOverlays() || !PosParams)
        return;

    // backup
    const float curtime = g_pGlobalVars->curtime;
    const float frametime = g_pGlobalVars->frametime;

    g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick;
    g_pGlobalVars->curtime = pEnt->GetSimulationTime();

    int backup_eflags = pEnt->m_iEFlags();

    // SetLocalVelocity
    pEnt->m_iEFlags() &= ~0x1000; // InvalidatePhysicsRecursive(VELOCITY_CHANGED); EFL_DIRTY_ABSVELOCITY = 0x1000
    pEnt->SetAbsVelocity(pEnt->GetVelocity());

    // invalidates prior animations
    if (AnimState->m_iLastClientSideAnimationUpdateFramecount == g_pGlobalVars->framecount)
        AnimState->m_iLastClientSideAnimationUpdateFramecount = g_pGlobalVars->framecount - 1;

    pEnt->ClientAnimations(true);

    // updates local animations + poses + calculates new abs angle based on eyeangles and other stuff
    // call resolver
    proper_brute(pEnt);
    pEnt->UpdateClientAnimation();

    pEnt->ClientAnimations(false);

    // restore
    pEnt->m_iEFlags() = backup_eflags;

    g_pGlobalVars->curtime = curtime;
    g_pGlobalVars->frametime = frametime;

    pEnt->InvalidateBoneCache();
    pEnt->SetupBones(nullptr, -1, 0x7FF00, g_pGlobalVars->curtime);
}

void HandleHits(C_BaseEntity* pEnt)
{
    auto NetChannel = g_pEngine->GetNetChannelInfo();

    if (!NetChannel)
        return;

    static float predTime[65];
    static bool init[65];

    if (Globals::Shot[pEnt->EntIndex()])
    {
        if (init[pEnt->EntIndex()])
        {
            g_Resolver.pitchHit[pEnt->EntIndex()] = pEnt->GetEyeAngles().x;
            predTime[pEnt->EntIndex()] = g_pGlobalVars->curtime + NetChannel->GetAvgLatency(FLOW_INCOMING) + NetChannel->GetAvgLatency(FLOW_OUTGOING) + TICKS_TO_TIME(1) + TICKS_TO_TIME(g_pEngine->GetNetChannel()->m_nChokedPackets);
            init[pEnt->EntIndex()] = false;
        }

        if (g_pGlobalVars->curtime > predTime[pEnt->EntIndex()] && !Globals::Hit[pEnt->EntIndex()])
        {
            Globals::MissedShots[pEnt->EntIndex()] += 1;
            Globals::Shot[pEnt->EntIndex()] = false;
        }
        else if (g_pGlobalVars->curtime <= predTime[pEnt->EntIndex()] && Globals::Hit[pEnt->EntIndex()])
            Globals::Shot[pEnt->EntIndex()] = false;

    }
    else
        init[pEnt->EntIndex()] = true;

    Globals::Hit[pEnt->EntIndex()] = false;
}

void Resolver::OnCreateMove() // cancer v2
{
    if (!c_config::get().aimbot_resolver)
        return;

    if (!Globals::LocalPlayer->IsAlive())
        return;

    if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
        return;


    for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
    {
        C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);

        if (!pPlayerEntity
            || !pPlayerEntity->IsAlive()
            || pPlayerEntity->IsDormant()
            || pPlayerEntity == Globals::LocalPlayer
            || pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
        {
            UseFreestandAngle[i] = false;
            continue;
        }

        if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
            UseFreestandAngle[pPlayerEntity->EntIndex()] = false;

        if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
        {
            bool Autowalled = false, HitSide1 = false, HitSide2 = false;

            float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
            Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);

            Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
            Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };

            Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
            Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };

            Vector Origin = pPlayerEntity->GetOrigin();

            Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };

            Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };

            for (int side = 0; side < 2; side++)
            {
                Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x,  Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
                Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x,  ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };

                if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
                {
                    if (side == 0)
                    {
                        HitSide1 = true;
                        FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                    }
                    else if (side == 1)
                    {
                        HitSide2 = true;
                        FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                    }

                    Autowalled = true;
                }
                else
                {
                    for (int side222 = 0; side222 < 2; side222++)
                    {
                        Vector OriginAutowall222 = { Origin.x + OriginLeftRight[side222].x,  Origin.y - OriginLeftRight[side222].y , Origin.z + 90 };

                        if (g_Autowall.CanHitFloatingPoint(OriginAutowall222, OriginAutowall2))
                        {
                            if (side222 == 0)
                            {
                                HitSide1 = true;
                                FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                            }
                            else if (side222 == 1)
                            {
                                HitSide2 = true;
                                FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                            }

                            Autowalled = true;
                        }
                    }
                }
            }

            if (Autowalled)
            {
                if (HitSide1 && HitSide2)
                    UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
                else
                    UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
            }
        }
    }
}

void Resolver::FrameStage(ClientFrameStage_t stage)
{
    if (!Globals::LocalPlayer || !g_pEngine->IsInGame())
        return;

    static bool  wasDormant[65];

    for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
    {
        C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);

        if (!pPlayerEntity
            || !pPlayerEntity->IsAlive())
            continue;
        if (pPlayerEntity->IsDormant())
        {
            wasDormant[i] = true;
            continue;
        }

        if (stage == FRAME_RENDER_START)
        {
            HandleHits(pPlayerEntity);
            proper_brute(pPlayerEntity);
            AnimationFix(pPlayerEntity);
        }

        if (stage == FRAME_NET_UPDATE_END && pPlayerEntity != Globals::LocalPlayer)
        {
            auto VarMap = reinterpret_cast<uintptr_t>(pPlayerEntity) + 36;
            auto VarMapSize = *reinterpret_cast<int*>(VarMap + 20);

            for (auto index = 0; index < VarMapSize; index++)
                *reinterpret_cast<uintptr_t*>(*reinterpret_cast<uintptr_t*>(VarMap) + index * 12) = 0;
        }

        wasDormant[i] = false;
    }//
}
UPD : если у вас ошибка с m_iEFlags() , в CEntity.h вставьте этот код:
C++:
uint32_t& m_iEFlags()
    {
        static unsigned int _m_iEFlags = g_pNetvars->GetOffset("DT_BasePlayer", "m_fFlags");
        return *(uint32_t*)((uintptr_t)this + _m_iEFlags);
    }
Удали , не позорься
 
CoderAlmir
Забаненный
Статус
Оффлайн
Регистрация
24 Мар 2020
Сообщения
58
Реакции[?]
26
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
[COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTR
Забаненный
Статус
Оффлайн
Регистрация
6 Май 2020
Сообщения
81
Реакции[?]
25
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
main public enemy
Эксперт
Статус
Оффлайн
Регистрация
30 Ноя 2019
Сообщения
1,531
Реакции[?]
647
Поинты[?]
0
Пиздец ты жоский научи пожалуйста получать флаги так же
И кстати ChockedTime это simtime - oldsimtime а не чокед ................................
 
When it hit it hit.
Забаненный
Статус
Оффлайн
Регистрация
2 Апр 2019
Сообщения
131
Реакции[?]
66
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Всем привет, недавно заметил, что очень много людей хвалят ресольвер икфакофа, сделал его под ху0.
credits: to ikfakof

код без антипасты, в дефолтном ху0 все это есть.
TODO: проверка на бота.

C++:
#include "Resolver.h"
#include "..\Aimbot\Aimbot.h"
#include "..\Aimbot\Autowall.h"
#include "..\Aimbot\LagComp.h"
#include "..\..\Utils\Utils.h"
#include "..\..\SDK\IVEngineClient.h"
#include "..\..\SDK\Hitboxes.h"
#include "..\..\SDK\PlayerInfo.h"
#include "..\..\Utils\Math.h"
#include "..\..\Menu\Menu.h"
#include "..\..\Menu\config.h"
#include "..\..\SDK\CEntity.h"
#include "..\..\SDK\IBaseClientDll.h"

Resolver g_Resolver;

template<class T, class U>
inline T clamp(T in, U low, U high)
{
    if (in <= low)
        return low;
    else if (in >= high)
        return high;
    else
        return in;
}

void BotCheck(C_BaseEntity* ent)
{

}

static auto GetSmoothedVelocity = [](float min_delta, Vector a, Vector b) {
    Vector delta = a - b;
    float delta_length = delta.Length();

    if (delta_length <= min_delta) {
        Vector result;
        if (-min_delta <= delta_length) {
            return a;
        }
        else {
            float iradius = 1.0f / (delta_length + FLT_EPSILON);
            return b - ((delta * iradius) * min_delta);
        }
    }
    else {
        float iradius = 1.0f / (delta_length + FLT_EPSILON);
        return b + ((delta * iradius) * min_delta);
    }
};

float AngleNormalize(float angle)
{
    angle = fmodf(angle, 360.0f);
    if (angle > 180)
    {
        angle -= 360;
    }
    if (angle < -180)
    {
        angle += 360;
    }
    return angle;
}

float ApproachAngle(float target, float value, float speed)
{
    target = (target * 182.04445f) * 0.0054931641f;
    value = (value * 182.04445f) * 0.0054931641f;

    float delta = target - value;

    // Speed is assumed to be positive
    if (speed < 0)
        speed = -speed;

    if (delta < -180.0f)
        delta += 360.0f;
    else if (delta > 180.0f)
        delta -= 360.0f;

    if (delta > speed)
        value += speed;
    else if (delta < -speed)
        value -= speed;
    else
        value = target;

    return value;
}

void proper_brute(C_BaseEntity* ent)
{
    if (!Globals::LocalPlayer->IsAlive())
        return;

    auto animState = ent->AnimState();
    float m_flFakeGoalFeetYaw[65];
    // Rebuild setup velocity to receive flMinBodyYaw and flMaxBodyYaw
    Vector velocity = ent->GetVelocity();
    float spd = velocity.LengthSqr();
    if (spd > std::powf(1.2f * 260.0f, 2.f)) {
        Vector velocity_normalized = velocity.Normalize();
        velocity = velocity_normalized * (1.2f * 260.0f);
    }

    float v25 = clamp(ent->m_fDuckSpeed() + animState->m_fLandingDuckAdditiveSomething, 0.0f, 1.0f);
    float v26 = animState->m_fDuckAmount;
    float v27 = g_pClientState->m_nChokedCommands * 6.0f;
    float v28;

    // clamp
    if ((v25 - v26) <= v27) {
        if (-v27 <= (v25 - v26))
            v28 = v25;
        else
            v28 = v26 - v27;
    }
    else {
        v28 = v26 + v27;
    }

    float flDuckAmount = clamp(v28, 0.0f, 1.0f);

    Vector animationVelocity = GetSmoothedVelocity(g_pClientState->m_nChokedCommands * 2000.0f, velocity, ent->GetVelocity());
    float speed = std::fminf(animationVelocity.Length(), 260.0f);

    auto weapon = ent->GetActiveWeapon();

    float flMaxMovementSpeed = 260.0f;
    if (weapon) {
        flMaxMovementSpeed = std::fmaxf(weapon->GetCSWpnData()->max_speed, 0.001f);
    }
    float m_flGroundFraction = *(float*)(animState + 0x11C);
    float flRunningSpeed = speed / (flMaxMovementSpeed * 0.520f);
    float flDuckingSpeed = speed / (flMaxMovementSpeed * 0.340f);

    flRunningSpeed = clamp(flRunningSpeed, 0.0f, 1.0f);

    float flYawModifier = (((m_flGroundFraction * -0.3f) - 0.2f) * flRunningSpeed) + 1.0f;
    if (flDuckAmount > 0.0f) {
        float flDuckingSpeed = clamp(flDuckingSpeed, 0.0f, 1.0f);
        flYawModifier += (flDuckAmount * flDuckingSpeed) * (0.5f - flYawModifier);
    }

    float flMinBodyYaw = std::fabsf(((float)(uintptr_t(animState) + 0x330)) * flYawModifier);
    float flMaxBodyYaw = std::fabsf(((float)(uintptr_t(animState) + 0x334)) * flYawModifier);

    float flEyeYaw = ent->GetEyeAngles().y;
    float flEyeDiff = std::remainderf(flEyeYaw - m_flFakeGoalFeetYaw[ent->EntIndex()], 360.f);

    if (flEyeDiff <= flMaxBodyYaw) {
        if (flMinBodyYaw > flEyeDiff)
            m_flFakeGoalFeetYaw[ent->EntIndex()] = fabs(flMinBodyYaw) + flEyeYaw;
    }
    else {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = flEyeYaw - fabs(flMaxBodyYaw);
    }

    m_flFakeGoalFeetYaw[ent->EntIndex()] = std::remainderf(m_flFakeGoalFeetYaw[ent->EntIndex()], 360.f);

    if (speed > 0.1f || fabs(velocity.z) > 100.0f) {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = ApproachAngle(
            flEyeYaw,
            m_flFakeGoalFeetYaw[ent->EntIndex()],
            ((m_flGroundFraction * 20.0f) + 30.0f)
            * g_pClientState->m_nChokedCommands);
    }
    else {
        m_flFakeGoalFeetYaw[ent->EntIndex()] = ApproachAngle(
            ent->GetLowerBodyYaw(),
            m_flFakeGoalFeetYaw[ent->EntIndex()],
            g_pClientState->m_nChokedCommands * 100.0f);
    }

    float Left = flEyeYaw + flMinBodyYaw;
    float Right = flEyeYaw + flMaxBodyYaw;

    float resolveYaw;

    switch (Globals::MissedShots[ent->EntIndex()] % 3) {
    case 0: // brute left side
        resolveYaw = Left;
        break;
    case 1: // brute fake side
        resolveYaw = m_flFakeGoalFeetYaw[ent->EntIndex()];
        break;
    case 2: // brute right side
        resolveYaw = Right;
        break;
    default:
        break;
    }

    animState->m_flGoalFeetYaw = resolveYaw;
}

void Resolver::AnimationFix(C_BaseEntity* pEnt)
{
    if (!pEnt || !pEnt->IsAlive() || pEnt == Globals::LocalPlayer || pEnt->GetTeam() == Globals::LocalPlayer->GetTeam())
        return;

    if (!Globals::LocalPlayer || !Globals::LocalPlayer->IsAlive() || !Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->GetActiveWeapon()->GetAmmo() == 0)
        return;

    float* PosParams = (float*)((uintptr_t)pEnt + 0x2774);
    auto* AnimState = pEnt->AnimState();
    if (!AnimState || !pEnt->AnimOverlays() || !PosParams)
        return;

    // backup
    const float curtime = g_pGlobalVars->curtime;
    const float frametime = g_pGlobalVars->frametime;

    g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick;
    g_pGlobalVars->curtime = pEnt->GetSimulationTime();

    int backup_eflags = pEnt->m_iEFlags();

    // SetLocalVelocity
    pEnt->m_iEFlags() &= ~0x1000; // InvalidatePhysicsRecursive(VELOCITY_CHANGED); EFL_DIRTY_ABSVELOCITY = 0x1000
    pEnt->SetAbsVelocity(pEnt->GetVelocity());

    // invalidates prior animations
    if (AnimState->m_iLastClientSideAnimationUpdateFramecount == g_pGlobalVars->framecount)
        AnimState->m_iLastClientSideAnimationUpdateFramecount = g_pGlobalVars->framecount - 1;

    pEnt->ClientAnimations(true);

    // updates local animations + poses + calculates new abs angle based on eyeangles and other stuff
    // call resolver
    proper_brute(pEnt);
    pEnt->UpdateClientAnimation();

    pEnt->ClientAnimations(false);

    // restore
    pEnt->m_iEFlags() = backup_eflags;

    g_pGlobalVars->curtime = curtime;
    g_pGlobalVars->frametime = frametime;

    pEnt->InvalidateBoneCache();
    pEnt->SetupBones(nullptr, -1, 0x7FF00, g_pGlobalVars->curtime);
}

void HandleHits(C_BaseEntity* pEnt)
{
    auto NetChannel = g_pEngine->GetNetChannelInfo();

    if (!NetChannel)
        return;

    static float predTime[65];
    static bool init[65];

    if (Globals::Shot[pEnt->EntIndex()])
    {
        if (init[pEnt->EntIndex()])
        {
            g_Resolver.pitchHit[pEnt->EntIndex()] = pEnt->GetEyeAngles().x;
            predTime[pEnt->EntIndex()] = g_pGlobalVars->curtime + NetChannel->GetAvgLatency(FLOW_INCOMING) + NetChannel->GetAvgLatency(FLOW_OUTGOING) + TICKS_TO_TIME(1) + TICKS_TO_TIME(g_pEngine->GetNetChannel()->m_nChokedPackets);
            init[pEnt->EntIndex()] = false;
        }

        if (g_pGlobalVars->curtime > predTime[pEnt->EntIndex()] && !Globals::Hit[pEnt->EntIndex()])
        {
            Globals::MissedShots[pEnt->EntIndex()] += 1;
            Globals::Shot[pEnt->EntIndex()] = false;
        }
        else if (g_pGlobalVars->curtime <= predTime[pEnt->EntIndex()] && Globals::Hit[pEnt->EntIndex()])
            Globals::Shot[pEnt->EntIndex()] = false;

    }
    else
        init[pEnt->EntIndex()] = true;

    Globals::Hit[pEnt->EntIndex()] = false;
}

void Resolver::OnCreateMove() // cancer v2
{
    if (!c_config::get().aimbot_resolver)
        return;

    if (!Globals::LocalPlayer->IsAlive())
        return;

    if (!Globals::LocalPlayer->GetActiveWeapon() || Globals::LocalPlayer->IsKnifeorNade())
        return;


    for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
    {
        C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);

        if (!pPlayerEntity
            || !pPlayerEntity->IsAlive()
            || pPlayerEntity->IsDormant()
            || pPlayerEntity == Globals::LocalPlayer
            || pPlayerEntity->GetTeam() == Globals::LocalPlayer->GetTeam())
        {
            UseFreestandAngle[i] = false;
            continue;
        }

        if (abs(pPlayerEntity->GetVelocity().Length2D()) > 29.f)
            UseFreestandAngle[pPlayerEntity->EntIndex()] = false;

        if (abs(pPlayerEntity->GetVelocity().Length2D()) <= 29.f && !UseFreestandAngle[pPlayerEntity->EntIndex()])
        {
            bool Autowalled = false, HitSide1 = false, HitSide2 = false;

            float angToLocal = g_Math.CalcAngle(Globals::LocalPlayer->GetOrigin(), pPlayerEntity->GetOrigin()).y;
            Vector ViewPoint = Globals::LocalPlayer->GetOrigin() + Vector(0, 0, 90);

            Vector2D Side1 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal))),(45 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
            Vector2D Side2 = { (45 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(45 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };

            Vector2D Side3 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal))),(50 * cos(g_Math.GRD_TO_BOG(angToLocal))) };
            Vector2D Side4 = { (50 * sin(g_Math.GRD_TO_BOG(angToLocal + 180))) ,(50 * cos(g_Math.GRD_TO_BOG(angToLocal + 180))) };

            Vector Origin = pPlayerEntity->GetOrigin();

            Vector2D OriginLeftRight[] = { Vector2D(Side1.x, Side1.y), Vector2D(Side2.x, Side2.y) };

            Vector2D OriginLeftRightLocal[] = { Vector2D(Side3.x, Side3.y), Vector2D(Side4.x, Side4.y) };

            for (int side = 0; side < 2; side++)
            {
                Vector OriginAutowall = { Origin.x + OriginLeftRight[side].x,  Origin.y - OriginLeftRight[side].y , Origin.z + 90 };
                Vector OriginAutowall2 = { ViewPoint.x + OriginLeftRightLocal[side].x,  ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };

                if (g_Autowall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
                {
                    if (side == 0)
                    {
                        HitSide1 = true;
                        FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                    }
                    else if (side == 1)
                    {
                        HitSide2 = true;
                        FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                    }

                    Autowalled = true;
                }
                else
                {
                    for (int side222 = 0; side222 < 2; side222++)
                    {
                        Vector OriginAutowall222 = { Origin.x + OriginLeftRight[side222].x,  Origin.y - OriginLeftRight[side222].y , Origin.z + 90 };

                        if (g_Autowall.CanHitFloatingPoint(OriginAutowall222, OriginAutowall2))
                        {
                            if (side222 == 0)
                            {
                                HitSide1 = true;
                                FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                            }
                            else if (side222 == 1)
                            {
                                HitSide2 = true;
                                FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                            }

                            Autowalled = true;
                        }
                    }
                }
            }

            if (Autowalled)
            {
                if (HitSide1 && HitSide2)
                    UseFreestandAngle[pPlayerEntity->EntIndex()] = false;
                else
                    UseFreestandAngle[pPlayerEntity->EntIndex()] = true;
            }
        }
    }
}

void Resolver::FrameStage(ClientFrameStage_t stage)
{
    if (!Globals::LocalPlayer || !g_pEngine->IsInGame())
        return;

    static bool  wasDormant[65];

    for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
    {
        C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);

        if (!pPlayerEntity
            || !pPlayerEntity->IsAlive())
            continue;
        if (pPlayerEntity->IsDormant())
        {
            wasDormant[i] = true;
            continue;
        }

        if (stage == FRAME_RENDER_START)
        {
            HandleHits(pPlayerEntity);
            proper_brute(pPlayerEntity);
            AnimationFix(pPlayerEntity);
        }

        if (stage == FRAME_NET_UPDATE_END && pPlayerEntity != Globals::LocalPlayer)
        {
            auto VarMap = reinterpret_cast<uintptr_t>(pPlayerEntity) + 36;
            auto VarMapSize = *reinterpret_cast<int*>(VarMap + 20);

            for (auto index = 0; index < VarMapSize; index++)
                *reinterpret_cast<uintptr_t*>(*reinterpret_cast<uintptr_t*>(VarMap) + index * 12) = 0;
        }

        wasDormant[i] = false;
    }//
}
UPD : если у вас ошибка с m_iEFlags() , в CEntity.h вставьте этот код:
C++:
uint32_t& m_iEFlags()
    {
        static unsigned int _m_iEFlags = g_pNetvars->GetOffset("DT_BasePlayer", "m_fFlags");
        return *(uint32_t*)((uintptr_t)this + _m_iEFlags);
    }
Wrong Wrong and Wrong.
also taken from ikfakof uc post.
there is no any proper animationfix in that code.

Another malicious post to attract rep.
 
[COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTR
Забаненный
Статус
Оффлайн
Регистрация
6 Май 2020
Сообщения
81
Реакции[?]
25
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
When it hit it hit.
Забаненный
Статус
Оффлайн
Регистрация
2 Апр 2019
Сообщения
131
Реакции[?]
66
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу