Исходник Calc_hc from fatality to supremacy

Участник
Статус
Оффлайн
Регистрация
6 Апр 2021
Сообщения
338
Реакции[?]
207
Поинты[?]
113K
Код:
std::tuple<float, float> aimbot_helpers::calc_hc( std::vector<std::shared_ptr<intersection>>& intersections, ang_t vangles, lag_record_t& record ) {
    const auto player = g_csgo.m_entlist->GetClientEntity<Player*>( record.m_index );
    auto weapon = g_cl.m_weapon;
    if ( !weapon )
        return { 0.f, 0.f };

    auto local_player = g_cl.m_local;

    Vector forward{}, right{}, up{};
    vec3_t eyepos;
    local_player->GetEyePos( &eyepos );
    auto inaccuracy = weapon->get_inaccuracy( );

    const auto angles = vangles.Clamp( );
    const auto range = weapon->get_wpn_data( )->m_range;
    math::AngleVectors( angles, &forward, &right, &up );
    penetration::fast_vec_normalize( forward );
    penetration::fast_vec_normalize( right );
    penetration::fast_vec_normalize( up );

    auto hits = 0;
    auto hits_roll = 0;
    auto i = 0;

    Vector v_spread = {};
    std::tuple<float, float, float>* seed = nullptr;
    float spread_x = {}, spread_y = {}, seed_inaccuracy = {};

    while ( i < 32 ) {
        seed = &precomputed_seeds[ i ];
        seed_inaccuracy = std::get<0>( *seed ) * inaccuracy;
        spread_x = std::get<2>( *seed ) * seed_inaccuracy;
        spread_y = std::get<1>( *seed ) * seed_inaccuracy;
        v_spread = ( forward + right * spread_x + up * spread_y );

        penetration::fast_vec_normalize( v_spread );

        ang_t spread_view{};
        Vector end{};

        math::VectorAngles( v_spread, spread_view );
        spread_view.NormalizeNoClamp( );
        math::AngleVectors( angles - ( spread_view - angles ), &end );
        penetration::fast_vec_normalize( end );

        CGameTrace tr;
        //Ray ray;
        const auto trace_end = eyepos + ( end * range );

        Ray ray( eyepos, trace_end );

        auto missed_roll = false;
        auto missed = false;
        for ( auto& cur : intersections ) {
            if ( cur->roll && missed_roll )
                continue;

            cur->trace_hitboxes( ray, tr );
            if ( tr.m_entity != player ) {
                if ( cur->roll )
                    missed_roll = true;
                else {
                    missed_roll = missed = true;
                    break;
                }
            }
        }

        if ( !missed )
            hits++;

        if ( !missed_roll )
            hits_roll++;

        i++;
    }

    return { static_cast< float >( hits ) * 3.125f, static_cast< float >( hits_roll ) * 3.125f };
}
 
https://t.me/SwiftBlink
Участник
Статус
Оффлайн
Регистрация
30 Июн 2020
Сообщения
574
Реакции[?]
182
Поинты[?]
3K
ты собрался перепастить весь фаталити в супримаси? xdddd
давай тогда сразу сделай fatality in supremacy SDK:LUL:
 
Участник
Статус
Оффлайн
Регистрация
6 Апр 2021
Сообщения
338
Реакции[?]
207
Поинты[?]
113K
Сверху Снизу