Исходник Eax AntiFreestand LOL

Начинающий
Статус
Оффлайн
Регистрация
9 Сен 2021
Сообщения
220
Реакции[?]
18
Поинты[?]
8K
its already public but here

C++:
float Resolver::AntiFreestand(Player* player, LagRecord* record, vec3_t start_, vec3_t end, bool include_base, float base_yaw, float delta) {
    AimPlayer* data = &g_aimbot.m_players[player->index() - 1];

    // constants.
    constexpr float STEP{ 4.f };
    constexpr float RANGE{ 32.f };

    // construct vector of angles to test.
    std::vector< AdaptiveAngle > angles{ };

    angles.emplace_back(base_yaw + delta);
    angles.emplace_back(base_yaw - delta);

    if (include_base)
        angles.emplace_back(base_yaw);

    // start the trace at the enemy shoot pos.
    vec3_t start = start_;

    // see if we got any valid result.
    // if this is false the path was not obstructed with anything.
    bool valid{ false };

    // get the enemies shoot pos.
    vec3_t shoot_pos = end;

    // iterate vector of angles.
    for (auto it = angles.begin(); it != angles.end(); ++it) {

        // compute the 'rough' estimation of where our head will be.
        vec3_t end{ shoot_pos.x + std::cos(math::deg_to_rad(it->m_yaw)) * RANGE,
            shoot_pos.y + std::sin(math::deg_to_rad(it->m_yaw)) * RANGE,
            shoot_pos.z };

        // draw a line for debugging purposes.
        //g_csgo.m_debug_overlay->AddLineOverlay( start, end, 255, 0, 0, true, 0.1f );

        // compute the direction.
        vec3_t dir = end - start;
        float len = dir.normalize();

        // should never happen.
        if (len <= 0.f)
            continue;

        // step thru the total distance, 4 units per step.
        for (float i{ 0.f }; i < len; i += STEP) {
            // get the current step position.
            vec3_t point = start + (dir * i);

            // get the contents at this point.
            int contents = g_csgo.m_engine_trace->GetPointContents(point, MASK_SHOT_HULL);

            // contains nothing that can stop a bullet.
            if (!(contents & MASK_SHOT_HULL))
                continue;

            float mult = 1.f;

            // over 50% of the total length, prioritize this shit.
            if (i > (len * 0.5f))
                mult = 1.25f;

            // over 90% of the total length, prioritize this shit.
            if (i > (len * 0.75f))
                mult = 1.25f;

            // over 90% of the total length, prioritize this shit.
            if (i > (len * 0.9f))
                mult = 2.f;

            // append 'penetrated distance'.
            it->m_dist += (STEP * mult);

            // mark that we found anything.
            valid = true;
        }
    }

    if (!valid)
        return base_yaw;

    // put the most distance at the front of the container.
    std::sort(angles.begin(), angles.end(),
        [](const AdaptiveAngle& a, const AdaptiveAngle& b) {
            return a.m_dist > b.m_dist;
        });

    // the best angle should be at the front now.
    return angles.front().m_yaw;
}
this is probably better has more sanity checks
 
retard
Пользователь
Статус
Оффлайн
Регистрация
13 Мар 2021
Сообщения
366
Реакции[?]
67
Поинты[?]
10K
its already public but here

C++:
float Resolver::AntiFreestand(Player* player, LagRecord* record, vec3_t start_, vec3_t end, bool include_base, float base_yaw, float delta) {
    AimPlayer* data = &g_aimbot.m_players[player->index() - 1];

    // constants.
    constexpr float STEP{ 4.f };
    constexpr float RANGE{ 32.f };

    // construct vector of angles to test.
    std::vector< AdaptiveAngle > angles{ };

    angles.emplace_back(base_yaw + delta);
    angles.emplace_back(base_yaw - delta);

    if (include_base)
        angles.emplace_back(base_yaw);

    // start the trace at the enemy shoot pos.
    vec3_t start = start_;

    // see if we got any valid result.
    // if this is false the path was not obstructed with anything.
    bool valid{ false };

    // get the enemies shoot pos.
    vec3_t shoot_pos = end;

    // iterate vector of angles.
    for (auto it = angles.begin(); it != angles.end(); ++it) {

        // compute the 'rough' estimation of where our head will be.
        vec3_t end{ shoot_pos.x + std::cos(math::deg_to_rad(it->m_yaw)) * RANGE,
            shoot_pos.y + std::sin(math::deg_to_rad(it->m_yaw)) * RANGE,
            shoot_pos.z };

        // draw a line for debugging purposes.
        //g_csgo.m_debug_overlay->AddLineOverlay( start, end, 255, 0, 0, true, 0.1f );

        // compute the direction.
        vec3_t dir = end - start;
        float len = dir.normalize();

        // should never happen.
        if (len <= 0.f)
            continue;

        // step thru the total distance, 4 units per step.
        for (float i{ 0.f }; i < len; i += STEP) {
            // get the current step position.
            vec3_t point = start + (dir * i);

            // get the contents at this point.
            int contents = g_csgo.m_engine_trace->GetPointContents(point, MASK_SHOT_HULL);

            // contains nothing that can stop a bullet.
            if (!(contents & MASK_SHOT_HULL))
                continue;

            float mult = 1.f;

            // over 50% of the total length, prioritize this shit.
            if (i > (len * 0.5f))
                mult = 1.25f;

            // over 90% of the total length, prioritize this shit.
            if (i > (len * 0.75f))
                mult = 1.25f;

            // over 90% of the total length, prioritize this shit.
            if (i > (len * 0.9f))
                mult = 2.f;

            // append 'penetrated distance'.
            it->m_dist += (STEP * mult);

            // mark that we found anything.
            valid = true;
        }
    }

    if (!valid)
        return base_yaw;

    // put the most distance at the front of the container.
    std::sort(angles.begin(), angles.end(),
        [](const AdaptiveAngle& a, const AdaptiveAngle& b) {
            return a.m_dist > b.m_dist;
        });

    // the best angle should be at the front now.
    return angles.front().m_yaw;
}
where the hell did u find this?? link it
 
Новичок
Статус
Оффлайн
Регистрация
19 Июл 2021
Сообщения
30
Реакции[?]
0
Поинты[?]
0
its already public but here

C++:
float Resolver::AntiFreestand(Player* player, LagRecord* record, vec3_t start_, vec3_t end, bool include_base, float base_yaw, float delta) {
    AimPlayer* data = &g_aimbot.m_players[player->index() - 1];

    // constants.
    constexpr float STEP{ 4.f };
    constexpr float RANGE{ 32.f };

    // construct vector of angles to test.
    std::vector< AdaptiveAngle > angles{ };

    angles.emplace_back(base_yaw + delta);
    angles.emplace_back(base_yaw - delta);

    if (include_base)
        angles.emplace_back(base_yaw);

    // start the trace at the enemy shoot pos.
    vec3_t start = start_;

    // see if we got any valid result.
    // if this is false the path was not obstructed with anything.
    bool valid{ false };

    // get the enemies shoot pos.
    vec3_t shoot_pos = end;

    // iterate vector of angles.
    for (auto it = angles.begin(); it != angles.end(); ++it) {

        // compute the 'rough' estimation of where our head will be.
        vec3_t end{ shoot_pos.x + std::cos(math::deg_to_rad(it->m_yaw)) * RANGE,
            shoot_pos.y + std::sin(math::deg_to_rad(it->m_yaw)) * RANGE,
            shoot_pos.z };

        // draw a line for debugging purposes.
        //g_csgo.m_debug_overlay->AddLineOverlay( start, end, 255, 0, 0, true, 0.1f );

        // compute the direction.
        vec3_t dir = end - start;
        float len = dir.normalize();

        // should never happen.
        if (len <= 0.f)
            continue;

        // step thru the total distance, 4 units per step.
        for (float i{ 0.f }; i < len; i += STEP) {
            // get the current step position.
            vec3_t point = start + (dir * i);

            // get the contents at this point.
            int contents = g_csgo.m_engine_trace->GetPointContents(point, MASK_SHOT_HULL);

            // contains nothing that can stop a bullet.
            if (!(contents & MASK_SHOT_HULL))
                continue;

            float mult = 1.f;

            // over 50% of the total length, prioritize this shit.
            if (i > (len * 0.5f))
                mult = 1.25f;

            // over 90% of the total length, prioritize this shit.
            if (i > (len * 0.75f))
                mult = 1.25f;

            // over 90% of the total length, prioritize this shit.
            if (i > (len * 0.9f))
                mult = 2.f;

            // append 'penetrated distance'.
            it->m_dist += (STEP * mult);

            // mark that we found anything.
            valid = true;
        }
    }

    if (!valid)
        return base_yaw;

    // put the most distance at the front of the container.
    std::sort(angles.begin(), angles.end(),
        [](const AdaptiveAngle& a, const AdaptiveAngle& b) {
            return a.m_dist > b.m_dist;
        });

    // the best angle should be at the front now.
    return angles.front().m_yaw;
}
its the same i reversed from the dump like not 100% but ye its very similar to the familyhook one from 2021
 
Начинающий
Статус
Оффлайн
Регистрация
15 Июл 2019
Сообщения
57
Реакции[?]
6
Поинты[?]
1K
Трахов
Пользователь
Статус
Оффлайн
Регистрация
6 Фев 2020
Сообщения
490
Реакции[?]
87
Поинты[?]
2K
C++:
void Resolver::AntiFreestand(Player* pEnemy, float& y, float flLeftDamage, float flRightDamage, float flRightFraction, float flLeftFraction, float flToMe, int& iShotsMissed)
{
    if (flLeftDamage >= 15 && flRightDamage >= 15)
    {
        //too much damage to both sides bruteforce!
        switch (iShotsMissed)
        {
        case 0:
            y = flToMe + 180;
            break;
        case 1:
            y = flToMe + 110;
            break;
        case 2:
            y = flToMe - 110;
            break;
        case 3:
            y = flToMe + 180;
            break;
        case 5:
            y = flToMe + 90;
            break;
        case 6:
            y = flToMe - 90;
            break;
        case 7:
            y = flToMe + 75;
            break;
        case 8:
            y = flToMe - 75;
            break;
        case 9:
            y = flToMe + 50;
            break;
        case 10:
            y = flToMe - 50;
            break;
        case 11:
            y = flToMe + 0;
            break;
        case 12:
            y = flToMe - 0;
            break;
        case 13:
            iShotsMissed = 0;
            break;
        }
    }
    else
    {
        if (flLeftDamage <= 0 && flRightDamage <= 0)
        {
            //no damage at all use edge
            if (flRightFraction == flLeftFraction)
            {
                switch (iShotsMissed)
                {
                case 0:
                    y = flToMe + 180;
                    break;
                case 1:
                    y = flToMe + 110;
                    break;
                case 2:
                    y = flToMe - 110;
                    break;
                case 3:
                    y = flToMe + 180;
                    break;
                case 5:
                    y = flToMe + 90;
                    break;
                case 6:
                    y = flToMe - 90;
                    break;
                case 7:
                    y = flToMe + 75;
                    break;
                case 8:
                    y = flToMe - 75;
                    break;
                case 9:
                    y = flToMe + 50;
                    break;
                case 10:
                    y = flToMe - 50;
                    break;
                case 11:
                    y = flToMe + 0;
                    break;
                case 12:
                    y = flToMe - 0;
                    break;
                case 13:
                    iShotsMissed = 0;
                    break;
                }
            }
            else
                if (flRightFraction < flLeftFraction)
                {
                    //negative
                    switch (iShotsMissed)
                    {
                    case 0:
                        y = flToMe + 180;
                        break;
                    case 1:
                        y = flToMe + 110;
                        break;
                    case 2:
                        y = flToMe - 110;
                        break;
                    case 3:
                        y = flToMe + 180;
                        break;
                    case 5:
                        y = flToMe + 90;
                        break;
                    case 6:
                        y = flToMe - 90;
                        break;
                    case 7:
                        y = flToMe + 75;
                        break;
                    case 8:
                        y = flToMe - 75;
                        break;
                    case 9:
                        y = flToMe + 50;
                        break;
                    case 10:
                        y = flToMe - 50;
                        break;
                    case 11:
                        y = flToMe + 0;
                        break;
                    case 12:
                        y = flToMe - 0;
                        break;
                    case 13:
                        iShotsMissed = 0;
                        break;
                    }
                }
                else
                {
                    switch (iShotsMissed)
                    {
                    case 0:
                        y = flToMe + 180;
                        break;
                    case 1:
                        y = flToMe + 110;
                        break;
                    case 2:
                        y = flToMe - 110;
                        break;
                    case 3:
                        y = flToMe + 180;
                        break;
                    case 5:
                        y = flToMe + 90;
                        break;
                    case 6:
                        y = flToMe - 90;
                        break;
                    case 7:
                        y = flToMe + 75;
                        break;
                    case 8:
                        y = flToMe - 75;
                        break;
                    case 9:
                        y = flToMe + 50;
                        break;
                    case 10:
                        y = flToMe - 50;
                        break;
                    case 11:
                        y = flToMe + 0;
                        break;
                    case 12:
                        y = flToMe - 0;
                        break;
                    case 13:
                        iShotsMissed = 0;
                        break;
                    }
                }
        }
        else
        {
            //got some damage turn damage based
            if (flLeftDamage == flRightDamage)
            {
                switch (iShotsMissed)
                {
                case 0:
                    y = flToMe + 180;
                    break;
                case 1:
                    y = flToMe + 110;
                    break;
                case 2:
                    y = flToMe - 110;
                    break;
                case 3:
                    y = flToMe + 180;
                    break;
                case 5:
                    y = flToMe + 90;
                    break;
                case 6:
                    y = flToMe - 90;
                    break;
                case 7:
                    y = flToMe + 75;
                    break;
                case 8:
                    y = flToMe - 75;
                    break;
                case 9:
                    y = flToMe + 50;
                    break;
                case 10:
                    y = flToMe - 50;
                    break;
                case 11:
                    y = flToMe + 0;
                    break;
                case 12:
                    y = flToMe - 0;
                    break;
                case 13:
                    iShotsMissed = 0;
                    break;
                }
            }
            else
                if (flLeftDamage > flRightDamage)
                {
                    //negative
                    switch (iShotsMissed)
                    {
                    case 0:
                        y = flToMe - 110.f;
                        break;
                    case 1:
                        y = flToMe + 180;
                        break;
                    case 2:
                        y = flToMe + 110.f;
                        break;
                    case 3:
                        y = flToMe - 180;
                        break;
                    case 4:
                        y = flToMe - 90;
                        break;
                    case 5:
                        y = flToMe + 90.f;
                        break;
                    case 6:
                        y = flToMe + 0.f;
                        break;
                    case 7:
                        y = flToMe - 0.f;
                    case 8:
                        iShotsMissed = 0;
                        break;

                    }
                }
                else
                {
                    switch (iShotsMissed)
                    {
                    case 0:
                        y = flToMe - 110.f;
                        break;
                    case 1:
                        y = flToMe + 180;
                        break;
                    case 2:
                        y = flToMe + 110.f;
                        break;
                    case 3:
                        y = flToMe - 180;
                        break;
                    case 4:
                        y = flToMe - 90;
                        break;
                    case 5:
                        y = flToMe + 90.f;
                        break;
                    case 6:
                        y = flToMe + 0.f;
                        break;
                    case 7:
                        y = flToMe - 0.f;
                    case 8:
                        iShotsMissed = 0;
                        break;
                    }
                }
        }
    }
}

good shit peti
kiduahook abuser
 
Участник
Статус
Оффлайн
Регистрация
13 Ноя 2020
Сообщения
1,230
Реакции[?]
180
Поинты[?]
70K
Screenshot_2023-10-16-12-39-13-67_8533ed6bac78e90ce765f82a6ab353f9.jpg
Этот код просто имба!
Я не ебу нахуй все к 0 приводит...
 
Сверху Снизу