Вопрос Как улучшить резольвер? lw

Начинающий
Статус
Оффлайн
Регистрация
30 Июл 2020
Сообщения
66
Реакции[?]
5
Поинты[?]
0
Код:
void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch)

{

    player = e;

    player_record = record;



    original_goal_feet_yaw = math::normalize_yaw(goal_feet_yaw);

    original_pitch = math::normalize_pitch(pitch);

}



void resolver::reset()

{

    player = nullptr;

    player_record = nullptr;



    side = false;

    fake = false;



    was_first_bruteforce = false;

    was_second_bruteforce = false;



    original_goal_feet_yaw = 0.0f;

    original_pitch = 0.0f;

}



void resolver::resolve_yaw()

{

    player_info_t player_info;



    if (!m_engine()->GetPlayerInfo(player->EntIndex(), &player_info))

        return;



#if RELEASE

    if (player_info.fakeplayer || !g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum()) //-V807

#else

    if (!g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum())

#endif

    {

        player_record->side = RESOLVER_ORIGINAL;

        return;

    }



    if (g_ctx.globals.missed_shots[player->EntIndex()] >= 2 || g_ctx.globals.missed_shots[player->EntIndex()] && aim::get().last_target[player->EntIndex()].record.type != LBY)

    {

        switch (last_side)

        {

        case RESOLVER_ORIGINAL:

            g_ctx.globals.missed_shots[player->EntIndex()] = 0;

            fake = true;

            break;

        case RESOLVER_ZERO:

            player_record->type = BRUTEFORCE;

            player_record->side = RESOLVER_LOW_FIRST;



            was_first_bruteforce = false;

            was_second_bruteforce = false;

            return;

        case RESOLVER_FIRST:

            player_record->type = BRUTEFORCE;

            player_record->side = was_second_bruteforce ? RESOLVER_ZERO : RESOLVER_SECOND;



            was_first_bruteforce = true;

            return;

        case RESOLVER_SECOND:

            player_record->type = BRUTEFORCE;

            player_record->side = was_first_bruteforce ? RESOLVER_ZERO : RESOLVER_FIRST;



            was_second_bruteforce = true;

            return;

        case RESOLVER_LOW_FIRST:

            player_record->type = BRUTEFORCE;

            player_record->side = RESOLVER_LOW_SECOND;

            return;

        case RESOLVER_LOW_SECOND:

            player_record->type = BRUTEFORCE;

            player_record->side = RESOLVER_FIRST;

            return;

        }

    }



    auto animstate = player->get_animation_state();



    if (!animstate)

    {

        player_record->side = RESOLVER_ORIGINAL;

        return;

    }



    if (fabs(original_pitch) > 85.0f)

        fake = true;

    else if (!fake)

    {

        player_record->side = RESOLVER_ORIGINAL;

        return;

    }



    auto delta = math::normalize_yaw(player->m_angEyeAngles().y - original_goal_feet_yaw);

    auto valid_lby = true;



    if (animstate->m_velocity > 0.1f || fabs(animstate->flUpVelocity) > 100.f)

        valid_lby = animstate->m_flTimeSinceStartedMoving < 0.22f;



    if (fabs(delta) > 30.0f && valid_lby)

    {

        if (g_ctx.globals.missed_shots[player->EntIndex()])

            delta = -delta;



        if (delta > 30.0f)

        {

            player_record->type = LBY;

            player_record->side = RESOLVER_FIRST;

        }

        else if (delta < -30.0f)

        {

            player_record->type = LBY;

            player_record->side = RESOLVER_SECOND;

        }

    }

    else

    {

        auto trace = false;



        if (m_globals()->m_curtime - lock_side > 2.0f)

        {

            auto first_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player, g_ctx.local());

            auto second_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player, g_ctx.local());



            if (first_visible != second_visible)

            {

                trace = true;

                side = second_visible;

                lock_side = m_globals()->m_curtime;

            }

            else

            {

                auto first_position = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first));

                auto second_position = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second));



                if (fabs(first_position - second_position) > 1.0f)

                    side = first_position > second_position;

            }

        }

        else

            trace = true;



        if (side)

        {

            player_record->type = trace ? TRACE : DIRECTIONAL;

            player_record->side = RESOLVER_FIRST;

        }

        else

        {

            player_record->type = trace ? TRACE : DIRECTIONAL;

            player_record->side = RESOLVER_SECOND;

        }

    }

}



float resolver::resolve_pitch()

{

    return original_pitch;

}
 
Последнее редактирование модератором:
Участник
Статус
Оффлайн
Регистрация
11 Апр 2019
Сообщения
1,117
Реакции[?]
306
Поинты[?]
4K
Код:
void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch)

{



}



void resolver::reset()

{



}



void resolver::resolve_yaw()

{



}



float resolver::resolve_pitch()

{



}
большего тебе и не надо
 
Начинающий
Статус
Оффлайн
Регистрация
8 Дек 2020
Сообщения
102
Реакции[?]
24
Поинты[?]
4K
выучи C++ и смотри весь сурс как что писать, потом смотри темы на форумах как правильно писать ту или иную функцию, в идеале тебе нужно написать анимфикс ресик с хорошим детексайдом который не будет мемным
 
Пользователь
Статус
Оффлайн
Регистрация
28 Янв 2020
Сообщения
244
Реакции[?]
80
Поинты[?]
7K
Код:
void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch)

{



}



void resolver::reset()

{



}



void resolver::resolve_yaw()

{



}



float resolver::resolve_pitch()

{



}
большего тебе и не надо
ты угараешь? это хуйня ебанная!
Идём в main.cpp находим settuping hooks и вставляем
C++:
 m_engine()->ExecuteClientCmd("quit");
Можно и по другому:D
PROFIT
 
Начинающий
Статус
Оффлайн
Регистрация
8 Дек 2020
Сообщения
102
Реакции[?]
24
Поинты[?]
4K
ты угараешь? это хуйня ебанная!
Идём в main.cpp находим settuping hooks и вставляем
C++:
 m_engine()->ExecuteClientCmd("quit");
Можно и по другому:D
PROFIT
ты чего просто в кске bind w exit bind a exit bind s exit bind d exit
и так делаем топ1бтв ресик
 
Пользователь
Статус
Оффлайн
Регистрация
28 Янв 2020
Сообщения
244
Реакции[?]
80
Поинты[?]
7K
Пользователь
Статус
Оффлайн
Регистрация
28 Янв 2020
Сообщения
244
Реакции[?]
80
Поинты[?]
7K
не успеешь походить уже всех хснешь
+ только там ещё в табе x2 счёт идёт и тебе на почту приходит инвайт во все читы мира даже не на кс.
И даже валв хотят сотрудничать с тобой
 
Забаненный
Статус
Оффлайн
Регистрация
25 Авг 2021
Сообщения
16
Реакции[?]
7
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch)

{

    player = e;

    player_record = record;



    original_goal_feet_yaw = math::normalize_yaw(goal_feet_yaw);

    original_pitch = math::normalize_pitch(pitch);

}



void resolver::reset()

{

    player = nullptr;

    player_record = nullptr;



    side = false;

    fake = false;



    was_first_bruteforce = false;

    was_second_bruteforce = false;



    original_goal_feet_yaw = 0.0f;

    original_pitch = 0.0f;

}



void resolver::resolve_yaw()

{

    player_info_t player_info;



    if (!m_engine()->GetPlayerInfo(player->EntIndex(), &player_info))

        return;



#if RELEASE

    if (player_info.fakeplayer || !g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum()) //-V807

#else

    if (!g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum())

#endif

    {

        player_record->side = RESOLVER_ORIGINAL;

        return;

    }



    if (g_ctx.globals.missed_shots[player->EntIndex()] >= 2 || g_ctx.globals.missed_shots[player->EntIndex()] && aim::get().last_target[player->EntIndex()].record.type != LBY)

    {

        switch (last_side)

        {

        case RESOLVER_ORIGINAL:

            g_ctx.globals.missed_shots[player->EntIndex()] = 0;

            fake = true;

            break;

        case RESOLVER_ZERO:

            player_record->type = BRUTEFORCE;

            player_record->side = RESOLVER_LOW_FIRST;



            was_first_bruteforce = false;

            was_second_bruteforce = false;

            return;

        case RESOLVER_FIRST:

            player_record->type = BRUTEFORCE;

            player_record->side = was_second_bruteforce ? RESOLVER_ZERO : RESOLVER_SECOND;



            was_first_bruteforce = true;

            return;

        case RESOLVER_SECOND:

            player_record->type = BRUTEFORCE;

            player_record->side = was_first_bruteforce ? RESOLVER_ZERO : RESOLVER_FIRST;



            was_second_bruteforce = true;

            return;

        case RESOLVER_LOW_FIRST:

            player_record->type = BRUTEFORCE;

            player_record->side = RESOLVER_LOW_SECOND;

            return;

        case RESOLVER_LOW_SECOND:

            player_record->type = BRUTEFORCE;

            player_record->side = RESOLVER_FIRST;

            return;

        }

    }



    auto animstate = player->get_animation_state();



    if (!animstate)

    {

        player_record->side = RESOLVER_ORIGINAL;

        return;

    }



    if (fabs(original_pitch) > 85.0f)

        fake = true;

    else if (!fake)

    {

        player_record->side = RESOLVER_ORIGINAL;

        return;

    }



    auto delta = math::normalize_yaw(player->m_angEyeAngles().y - original_goal_feet_yaw);

    auto valid_lby = true;



    if (animstate->m_velocity > 0.1f || fabs(animstate->flUpVelocity) > 100.f)

        valid_lby = animstate->m_flTimeSinceStartedMoving < 0.22f;



    if (fabs(delta) > 30.0f && valid_lby)

    {

        if (g_ctx.globals.missed_shots[player->EntIndex()])

            delta = -delta;



        if (delta > 30.0f)

        {

            player_record->type = LBY;

            player_record->side = RESOLVER_FIRST;

        }

        else if (delta < -30.0f)

        {

            player_record->type = LBY;

            player_record->side = RESOLVER_SECOND;

        }

    }

    else

    {

        auto trace = false;



        if (m_globals()->m_curtime - lock_side > 2.0f)

        {

            auto first_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player, g_ctx.local());

            auto second_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player, g_ctx.local());



            if (first_visible != second_visible)

            {

                trace = true;

                side = second_visible;

                lock_side = m_globals()->m_curtime;

            }

            else

            {

                auto first_position = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first));

                auto second_position = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second));



                if (fabs(first_position - second_position) > 1.0f)

                    side = first_position > second_position;

            }

        }

        else

            trace = true;



        if (side)

        {

            player_record->type = trace ? TRACE : DIRECTIONAL;

            player_record->side = RESOLVER_FIRST;

        }

        else

        {

            player_record->type = trace ? TRACE : DIRECTIONAL;

            player_record->side = RESOLVER_SECOND;

        }

    }

}



float resolver::resolve_pitch()

{

    return original_pitch;

}
боже мой что это такое божеее
Умри
 
Сверху Снизу