Исходник [weave] a proper bruteforce resolver for ur shit paste

get good get legendware
Участник
Статус
Оффлайн
Регистрация
22 Сен 2020
Сообщения
438
Реакции[?]
201
Поинты[?]
48K
since i saw literally everyone here posting shit resolver that dont even update any animations, i decided to release my shit resolver, ive tested it and it works like a charm, u will miss ur first hit, but you'll most likely hit ur second or third, the resolver isnt the best and its mainly made for weave, you'll resolver gay otc users, but u wont resolve skeet if thats what ur asking lmao , problems:- doesnt save the delta so youll bruteforce each player every new round xD , if the real is unhittable(behind a cover) , u will dumb the fake xD
C++:
#include "Hooks.h"
#include "Resolver.h"
#include "RageBacktracking.h"
#include "Ragebot.h"
#include "AnimationFix.h"


std::string ResolverMode[65];
int ResolverSide;
int last_ticks[65];
std::string ResolverMode_freestand[65];
std::string DidShot[65];
int IBasePlayer::GetChokedPackets() {
    auto ticks = TIME_TO_TICKS(GetSimulationTime() - GetOldSimulationTime());
    if (ticks == 0 && last_ticks[GetIndex()] > 0) {
        return last_ticks[GetIndex()] - 1;
    }
    else {
        last_ticks[GetIndex()] = ticks;
        return ticks;
    }
}

float CResolver::GetAngle(IBasePlayer* player) {
    return Math::NormalizeYaw(player->GetEyeAngles().y);
}

float CResolver::GetForwardYaw(IBasePlayer* player) {
    return Math::NormalizeYaw(GetBackwardYaw(player) - 180.f);
}

float CResolver::GetBackwardYaw(IBasePlayer* player) {
    return Math::CalculateAngle(csgo->local->GetOrigin(), player->GetOrigin()).y;
}

bool CResolver::TargetSide(IBasePlayer* player) {
    float yaw = Math::NormalizeYaw(GetBackwardYaw(player));
    float angle = GetAngle(player);
    return fabsf(angle - Math::NormalizeYaw(yaw + 100.f))
        >= fabsf(angle - Math::NormalizeYaw(yaw - 100.f));
}

void CResolver::DetectSide(IBasePlayer* player, int* side)
{
    Vector src3D, dst3D, forward, right, up, src, dst;
    float back_two, right_two, left_two;
    trace_t tr;
    Ray_t ray, ray2, ray3, ray4, ray5;
    CTraceFilter filter;

    Math::AngleVectors(Vector(0, GetBackwardYaw(player), 0), &forward, &right, &up);

    filter.pSkip = player;
    src3D = player->GetEyePosition();
    dst3D = src3D + (forward * 384); //Might want to experiment with other numbers, incase you don't know what the number does, its how far the trace will go. Lower = shorter.

    ray.Init(src3D, dst3D);
    interfaces.trace->TraceRay(ray, MASK_SHOT, &filter, &tr);
    back_two = (tr.endpos - tr.startpos).Length();

    ray2.Init(src3D + right * 35, dst3D + right * 35);
    interfaces.trace->TraceRay(ray2, MASK_SHOT, &filter, &tr);
    right_two = (tr.endpos - tr.startpos).Length();

    ray3.Init(src3D - right * 35, dst3D - right * 35);
    interfaces.trace->TraceRay(ray3, MASK_SHOT, &filter, &tr);
    left_two = (tr.endpos - tr.startpos).Length();

    if (left_two > right_two) {
        *side = -1;
        //Body should be right
    }
    else if (right_two > left_two) {
        *side = 1;
    }
    else
        *side = 0;
}

void CResolver::FixPitch(IBasePlayer* pEnt)
{
    float last_simtime[64] = { 0.f };
    float stored_pitch_1[64] = { 0.f };
    float fixed_pitch[64] = { 0.f };

    bool has_been_set[64] = { false };

    const auto local = csgo->local;
    if (!local)
        return;

    for (auto i = 0; i < interfaces.engine->GetMaxClients(); ++i)
    {

        const auto eye = pEnt->GetEyeAnglesPointer();

        auto pitch = 0.f;

        if (stored_pitch_1[i] == FLT_MAX || !has_been_set[i])
        {
            stored_pitch_1[i] = eye->x;
            has_been_set[i] = true;
        }

        if (stored_pitch_1[i] - eye->x < 30 && stored_pitch_1[i] - eye->x > -30)
        {
            pitch = eye->x;
        }
        else
        {
            pitch = stored_pitch_1[i];
        }

        pEnt->GetEyeAnglesPointer()->x = pitch;
    }
}

bool CResolver::DoesHaveJitter(IBasePlayer* player, int* new_side) {
    static float LastAngle[64];
    static int LastBrute[64];
    static bool Switch[64];
    static float LastUpdateTime[64];

    int i = player->GetIndex();

    float CurrentAngle = player->GetEyeAngles().y;
    if (!Math::IsNearEqual(CurrentAngle, LastAngle[i], 50.f)) {
        Switch[i] = !Switch[i];
        LastAngle[i] = CurrentAngle;
        *new_side = Switch[i] ? 1 : -1;
        LastBrute[i] = *new_side;
        LastUpdateTime[i] = interfaces.global_vars->curtime;
        return true;
    }
    else {
        if (fabsf(LastUpdateTime[i] - interfaces.global_vars->curtime >= TICKS_TO_TIME(17))
            || player->GetSimulationTime() != player->GetOldSimulationTime()) {
            LastAngle[i] = CurrentAngle;
        }
        *new_side = LastBrute[i];
    }
    return false;
}


void CResolver::StoreAntifreestand()
{
    if (!csgo->local->isAlive())
        return;

    if (!csgo->weapon->IsGun())
        return;


    for (int i = 1; i < interfaces.engine->GetMaxClients(); ++i)
    {
        auto player = interfaces.ent_list->GetClientEntity(i);

        if (!player || !player->isAlive() || player->IsDormant() || player->GetTeam() == csgo->local->GetTeam())
            continue;

        bool Autowalled = false, HitSide1 = false, HitSide2 = false;
        auto idx =

            player->GetIndex();
        float angToLocal = Math::CalculateAngle(csgo->local->GetOrigin(),

            player->GetOrigin()).y;
        Vector ViewPoint = csgo->local->GetOrigin() + Vector(0, 0, 90);
        Vector2D Side1 = { (45 * sin(DEG2RAD(angToLocal))),(45 * cos(DEG2RAD(angToLocal))) };
        Vector2D Side2 = { (45 * sin(DEG2RAD(angToLocal + 180))) ,(45 * cos(DEG2RAD(angToLocal + 180))) };

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

        Vector Origin = player->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 ViewPointAutowall = { ViewPoint.x + OriginLeftRightLocal[side].x, ViewPoint.y - OriginLeftRightLocal[side].y , ViewPoint.z };

            if (g_AutoWall.CanHitFloatingPoint(OriginAutowall, ViewPoint))
            {
                if (side == 0)
                {
                    HitSide1 = true;
                    FreestandSide[idx] = -1;
                }
                else if (side == 1)
                {
                    HitSide2 = true;
                    FreestandSide[idx] = 1;
                }

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

                    if (g_AutoWall.CanHitFloatingPoint(ViewPointAutowallalternative, ViewPointAutowall))
                    {
                        if (sidealternative == 0)
                        {
                            HitSide1 = true;
                            FreestandSide[idx] = -1;
                            //FreestandAngle[pPlayerEntity->EntIndex()] = 90;
                        }
                        else if (sidealternative == 1)
                        {
                            HitSide2 = true;
                            FreestandSide[idx] = 1;
                            //FreestandAngle[pPlayerEntity->EntIndex()] = -90;
                        }

                        Autowalled = true;
                    }
                }
            }
        }
    }
}

float get_max_desync_delta(IBasePlayer* player) {

    auto animstate = player->GetPlayerAnimState();

    float rate = 180;
    float duckammount = *(float*)(animstate + 0xA4);
    float speedfraction = max(0, min(*reinterpret_cast<float*>(animstate + 0xF8), 1));

    float speedfactor = max(0, min(1, *reinterpret_cast<float*> (animstate + 0xFC)));

    float unk1 = ((*reinterpret_cast<float*> (animstate + 0x11C) * -0.30000001) - 0.19999999) * speedfraction;
    float unk2 = unk1 + 1.f;
    float unk3;

    if (duckammount > 0) {

        unk2 += ((duckammount * speedfactor) * (0.5f - unk2));

    }

    unk3 = *(float*)(animstate + 0x334) * unk2;

    return rate;
}

int random(int min, int max)
{
    static bool first = true;
    if (first) {
        srand(time(NULL));
        first = false;
    }
    return min + rand() % ((max + 1) - min);
}


float laith_num_rand(float Min, float Max) // random number
{
    return ((float(rand()) / float(RAND_MAX)) * (Max - Min)) + Min;
}

void CResolver::Do(IBasePlayer* player) {

    if (!vars.ragebot.resolver)
        return;

    auto animstate = player->GetPlayerAnimState();

    const auto player_animation_state = player->GetPlayerAnimState();

    float newFeetYaw = 1.f;


    if (! player_animation_state)
        return;


    float v136 = fmod (newFeetYaw, 360.0);


    float v6 = 0;
    for (size_t i = 0; i <player-> GetNumAnimOverlays (); i ++) // hi yougame i hacked skeet
    {
        auto animLayer = player-> GetAnimOverlay (i);
        if (! animLayer)
            continue;
        if (player-> GetSequenceActivity (animLayer-> m_nSequence) == 979);
        auto v6 = player-> GetBody ();
    }

    int v19 = csgo-> missedshots [player-> EntIndex ()]% 2; // p2c bruteforce
    switch (v19)
    {
    case 0:
        animstate-> m_flGoalFeetYaw = animstate-> m_flGoalFeetYaw + laith_num_rand (0.0, 58.0);
        break;
    case 1:
        animstate-> m_flGoalFeetYaw = animstate-> m_flGoalFeetYaw - laith_num_rand (0.0, 116.0);
        break;
    case 2:
        animstate-> m_flGoalFeetYaw = animstate-> m_flGoalFeetYaw + laith_num_rand (0.0, 86.0);
        break;
    case 3:
        animstate-> m_flGoalFeetYaw = animstate-> m_flGoalFeetYaw - laith_num_rand (0.0, 172.0);
        break;
    default:
        return;



        player_animation_state-> m_flGoalFeetYaw = v136;
    }


}



/////////////////////////////////
C++:
#pragma once
struct animation;
class CResolver
{
private:
    float GetLeftYaw(IBasePlayer*);
    float GetRightYaw(IBasePlayer*);
    bool TargetSide(IBasePlayer*);
    void DetectSide(IBasePlayer*, int*);
    void FixPitch(IBasePlayer* pEnt);
    bool TargetJitter(IBasePlayer*, bool);
    bool DoesHaveJitter(IBasePlayer*, int*);
    int FreestandSide[64];
public:
    float GetAngle(IBasePlayer*);
    float GetForwardYaw(IBasePlayer*);
    float GetBackwardYaw(IBasePlayer*);
    void StoreAntifreestand();
    void Do3(IBasePlayer* player);
    void Do5(IBasePlayer* player);
    void Do2(IBasePlayer* player);
    void Do(IBasePlayer* player);
};
extern CResolver* resolver;
extern std::string ResolverMode[65];

///////////////////
 
get good get legendware
Участник
Статус
Оффлайн
Регистрация
22 Сен 2020
Сообщения
438
Реакции[?]
201
Поинты[?]
48K
thanks for the feed back , write down what u think is right to resolve , and tell me if im doing this correctly
C++:
    case 0:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + laith_num_rand(0.0, 35.0);
        break;
    case 1:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - laith_num_rand(0.0, 35.0); //116
        break;
    case 2:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + laith_num_rand(0.0, 45.0);//161
        break;
    case 3:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - laith_num_rand(0.0, 45.0);//206
        break;
    case 4:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + laith_num_rand(0.0, 58.0);//206
        break;
    case 5:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + laith_num_rand(0.0, 58.0);//206
        break;
 
Участник
Статус
Оффлайн
Регистрация
2 Фев 2020
Сообщения
818
Реакции[?]
378
Поинты[?]
0
thanks for the feed back , write down what u think is right to resolve , and tell me if im doing this correctly
C++:
    case 0:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + laith_num_rand(0.0, 35.0);
        break;
    case 1:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - laith_num_rand(0.0, 35.0); //116
        break;
    case 2:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + laith_num_rand(0.0, 45.0);//161
        break;
    case 3:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - laith_num_rand(0.0, 45.0);//206
        break;
    case 4:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + laith_num_rand(0.0, 58.0);//206
        break;
    case 5:
        animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + laith_num_rand(0.0, 58.0);//206
        break;
random numbers is very bad idea cuz it could be always too low or too big. You can use 60,25,45 and 35 (aka default values for brute)
 
get good get legendware
Участник
Статус
Оффлайн
Регистрация
22 Сен 2020
Сообщения
438
Реакции[?]
201
Поинты[?]
48K
random numbers is very bad idea cuz it could be always too low or too big. You can use 60,25,45 and 35 (aka default values for brute)
yea im already resolving after like one or two shots , but the thing is its not saving the delta :p , like each round u need to resolve the same player with the same delta , any ideas on how to fix this issue ? ik its not rly an issue but ive no idea how to save a delta and recall it
 
Забаненный
Статус
Оффлайн
Регистрация
21 Авг 2019
Сообщения
1,461
Реакции[?]
502
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
норм брат сотри это и ничего не поменяется. И зачем тебе антифристенд и тд если ты это даже не юзаешь
И еще мемы
1604479382415.png
 
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
31 Окт 2020
Сообщения
13
Реакции[?]
1
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
get good get legendware
Участник
Статус
Оффлайн
Регистрация
22 Сен 2020
Сообщения
438
Реакции[?]
201
Поинты[?]
48K
Забаненный
Статус
Оффлайн
Регистрация
14 Ноя 2020
Сообщения
15
Реакции[?]
3
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу