Исходник shit resolver for underrow sdk

Статус
В этой теме нельзя размещать новые ответы.
  • 7
  • 0
C++:
void Resolver::detectside(NetChannel* netdata, C_BaseEntity* entity)
{
    float Side = 60.f;
    auto animstate = entity->get_animation_state();
    float Middle = math.calc_angle(entity->get_eye_position(), entity->get_origin()).y + 180.f; // middle
    float Left = animstate->m_flEyeYaw + std::abs(Middle - entity->get_eye_angles().y); // right
    float Right = animstate->m_flEyeYaw - std::abs(Middle - entity->get_eye_angles().y); // left
    if (netdata->m_nChokedPackets == 1)
    {
        if (Side)
        {
                if (Side <= 0)
                    entity->get_animation_state()->m_flGoalFeetYaw = entity->get_eye_angles().y - 60.0;
                else
                    entity->get_animation_state()->m_flGoalFeetYaw = entity->get_eye_angles().y + 60.0;
                for (;  entity->get_animation_state()->m_flGoalFeetYaw > 180.0;  entity->get_animation_state()->m_flGoalFeetYaw = entity->get_animation_state()->m_flGoalFeetYaw - 360.0)
                    ;
                for (;  entity->get_animation_state()->m_flGoalFeetYaw < -180.0;  entity->get_animation_state()->m_flGoalFeetYaw = entity->get_animation_state()->m_flGoalFeetYaw + 360.0)
                    ;
            }
            else
            {
                if (Side <= 0)
                    entity->get_animation_state()->m_flGoalFeetYaw = Left;
                else
                    entity->get_animation_state()->m_flGoalFeetYaw = Right;
                for (;  entity->get_animation_state()->m_flGoalFeetYaw > 180.0; entity->get_animation_state()->m_flGoalFeetYaw = entity->get_animation_state()->m_flGoalFeetYaw - 360.0)
                    ;
                for (;  entity->get_animation_state()->m_flGoalFeetYaw < -180.0; entity->get_animation_state()->m_flGoalFeetYaw = entity->get_animation_state()->m_flGoalFeetYaw + 360.0)
                    ;
            }
        }
}
float get_max_desync_delta(C_BaseEntity* entity) {

    auto animstate = entity->get_animation_state();

    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.1f;
    float unk3;

    if (duckammount > 0) {

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

    }

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

    return unk3;
}
void Resolver::resolve(C_BaseEntity* entity, NetChannel* netdata, animation_layer* anim_layer, PlayerInfo_s* playerinfo)
{
    if (variable.Config.Resolver)
    {
        if (!entity->is_alive())
            return;
        if (playerinfo->fakeplayer)
            return;
        float max_delta = get_max_desync_delta(entity);
        auto animstate = entity->get_animation_state();
        float m_iSide = 60.f;
        float Middle = math.calc_angle(entity->get_eye_position(), entity->get_origin()).y + 180.f; // middle
        float Left = animstate->m_flEyeYaw + std::abs(Middle - entity->get_eye_angles().y); // right
        float Right = animstate->m_flEyeYaw - std::abs(Middle - entity->get_eye_angles().y); // left
        int i;
        if (csgo::m_missed_shots[entity->EntIndex()] == 0)
        {
            auto feet_yaw = anim_layer->m_flCycle > 0.9f && entity->get_abs_velocity().Length2D() < 0.f;

            if (feet_yaw <= 60)
            {
                if (-60 > feet_yaw)
                    entity->get_eye_angles().y == m_iSide + entity->get_eye_angles().y;
            }
            else
            {
                entity->get_eye_angles().y == m_iSide - entity->get_eye_angles().y;
            }
            if (anim_layer->m_flCycle > 0, 9)
            {
                for (int delta = 60.f; delta < -60.f; delta = delta - 20.f);

            }
            else
            {
                switch (csgo::m_missed_shots[entity->EntIndex()] % 5) {
                case 0 :
                    detectside(netdata, entity);
                        break;
                case 1:
                    entity->get_animation_state()->m_flGoalFeetYaw = Right, detectside(netdata, entity);
                    break;
                case 2:
                    entity->get_animation_state()->m_flGoalFeetYaw = Left, detectside(netdata, entity);
                    break;
                case 3:
                    entity->get_animation_state()->m_flGoalFeetYaw = Middle, detectside(netdata, entity);
                    break;
                case 4:
                    entity->get_animation_state()->m_flGoalFeetYaw = max_delta;
                    break;

                }

                }
            }

    }
}
 
Статус
В этой теме нельзя размещать новые ответы.

Похожие темы

Ответы
0
Просмотры
1K
Ответы
6
Просмотры
2K
  • Закрыта
Исходник Some resolver
Ответы
4
Просмотры
2K
Ответы
10
Просмотры
3K
Сверху Снизу