Исходник Resolver for Legendware

Забаненный
Статус
Оффлайн
Регистрация
19 Сен 2020
Сообщения
29
Реакции[?]
16
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
не судите строго просто фан ресик без говно кода
Код:
void c_resolver::resolve_yaw(player_t* player)
{
    auto animstate = player->get_animation_state();

    if (!animstate)
        return;

    AnimationLayer layers[13];
    AnimationLayer moveLayers[3][13];

    AnimationLayer preserver_anim_layers[13];
    auto speed = player->m_vecVelocity().Length2D();

    if (speed < 0.1f)
    {
        auto delta = std::remainder(math::normalize_yaw(player->m_angEyeAngles().y - player->m_flLowerBodyYawTarget()), 360.f) <= 0.f;

        if (layers[3].m_flWeight == 0.0f
            && layers[3].m_flCycle == 0.0f)
        {
            m_Side = math::clamp((2 * (delta <= 0.f) - 1), -1, 1);
        }
    }
    else if (!int(layers[12].m_flWeight * 1000.f))
    {
        if (int(layers[6].m_flWeight * 1000.f) == int(layers[6].m_flWeight * 1000.f))
        {
            float delta1 = abs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate);
            float delta2 = abs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate);
            float delta3 = abs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate);

            if (delta1 < delta3 || delta2 <= delta3 || (int)(float)(delta3 * 1000.0f)) {
                if (delta1 >= delta2 && delta3 > delta2 && !(int)(float)(delta2 * 1000.0f))
                {
                    m_Side = 1;
                    last_anims_update_time = m_globals()->m_realtime;
                }
            }
            else
            {
                m_Side = -1;
                last_anims_update_time = m_globals()->m_realtime;
            }
        }  
    }

    if (m_Side = 1)
    {
        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f);
    }
    else if (m_Side = -1)
    {
        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f);
    }

    if (g_ctx.globals.missed_shots[player->EntIndex()] > 0)
    {
        switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
        {
        case 0:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f);
            break;
        case 1:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f);
            break;
        }
    }
}
resolver h;
class c_resolver
{
public:
    void resolve_yaw(player_t* player);
    int m_Side = 0;
    float last_anims_update_time;  
};
extern c_resolver* resolver;
 
Забаненный
Статус
Оффлайн
Регистрация
18 Дек 2020
Сообщения
20
Реакции[?]
10
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Please just stop...
 
Забаненный
Статус
Оффлайн
Регистрация
20 Дек 2020
Сообщения
28
Реакции[?]
5
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
без говнокода.... ага
 
Участник
Статус
Оффлайн
Регистрация
26 Мар 2019
Сообщения
707
Реакции[?]
167
Поинты[?]
1K
не судите строго просто фан ресик без говно кода
Код:
void c_resolver::resolve_yaw(player_t* player)
{
    auto animstate = player->get_animation_state();

    if (!animstate)
        return;

    AnimationLayer layers[13];
    AnimationLayer moveLayers[3][13];

    AnimationLayer preserver_anim_layers[13];
    auto speed = player->m_vecVelocity().Length2D();

    if (speed < 0.1f)
    {
        auto delta = std::remainder(math::normalize_yaw(player->m_angEyeAngles().y - player->m_flLowerBodyYawTarget()), 360.f) <= 0.f;

        if (layers[3].m_flWeight == 0.0f
            && layers[3].m_flCycle == 0.0f)
        {
            m_Side = math::clamp((2 * (delta <= 0.f) - 1), -1, 1);
        }
    }
    else if (!int(layers[12].m_flWeight * 1000.f))
    {
        if (int(layers[6].m_flWeight * 1000.f) == int(layers[6].m_flWeight * 1000.f))
        {
            float delta1 = abs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate);
            float delta2 = abs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate);
            float delta3 = abs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate);

            if (delta1 < delta3 || delta2 <= delta3 || (int)(float)(delta3 * 1000.0f)) {
                if (delta1 >= delta2 && delta3 > delta2 && !(int)(float)(delta2 * 1000.0f))
                {
                    m_Side = 1;
                    last_anims_update_time = m_globals()->m_realtime;
                }
            }
            else
            {
                m_Side = -1;
                last_anims_update_time = m_globals()->m_realtime;
            }
        } 
    }

    if (m_Side = 1)
    {
        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f);
    }
    else if (m_Side = -1)
    {
        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f);
    }

    if (g_ctx.globals.missed_shots[player->EntIndex()] > 0)
    {
        switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
        {
        case 0:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f);
            break;
        case 1:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f);
            break;
        }
    }
}
resolver h;
class c_resolver
{
public:
    void resolve_yaw(player_t* player);
    int m_Side = 0;
    float last_anims_update_time; 
};
extern c_resolver* resolver;
Теперь я могу тапать скит
 
Забаненный
Участник
Статус
Оффлайн
Регистрация
23 Сен 2019
Сообщения
1,020
Реакции[?]
190
Поинты[?]
0
Просто Брут резольвер, спасибо, теперь я могу тапнуть самого себя!
 
Пользователь
Статус
Оффлайн
Регистрация
7 Фев 2020
Сообщения
76
Реакции[?]
33
Поинты[?]
0

if (g_ctx.globals.missed_shots[player->EntIndex()] > 0)
{
switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
{
case 0:
animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f);
break;
case 1:
animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f);
break;
}
}
}



Нахуя а главное зачем!!!
 
if (!send_packet) animstate->m_flGoalFeetYaw += 58
Участник
Статус
Оффлайн
Регистрация
10 Мар 2019
Сообщения
653
Реакции[?]
186
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
27 Фев 2020
Сообщения
255
Реакции[?]
25
Поинты[?]
0
не судите строго просто фан ресик без говно кода
Код:
void c_resolver::resolve_yaw(player_t* player)
{
    auto animstate = player->get_animation_state();

    if (!animstate)
        return;

    AnimationLayer layers[13];
    AnimationLayer moveLayers[3][13];

    AnimationLayer preserver_anim_layers[13];
    auto speed = player->m_vecVelocity().Length2D();

    if (speed < 0.1f)
    {
        auto delta = std::remainder(math::normalize_yaw(player->m_angEyeAngles().y - player->m_flLowerBodyYawTarget()), 360.f) <= 0.f;

        if (layers[3].m_flWeight == 0.0f
            && layers[3].m_flCycle == 0.0f)
        {
            m_Side = math::clamp((2 * (delta <= 0.f) - 1), -1, 1);
        }
    }
    else if (!int(layers[12].m_flWeight * 1000.f))
    {
        if (int(layers[6].m_flWeight * 1000.f) == int(layers[6].m_flWeight * 1000.f))
        {
            float delta1 = abs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate);
            float delta2 = abs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate);
            float delta3 = abs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate);

            if (delta1 < delta3 || delta2 <= delta3 || (int)(float)(delta3 * 1000.0f)) {
                if (delta1 >= delta2 && delta3 > delta2 && !(int)(float)(delta2 * 1000.0f))
                {
                    m_Side = 1;
                    last_anims_update_time = m_globals()->m_realtime;
                }
            }
            else
            {
                m_Side = -1;
                last_anims_update_time = m_globals()->m_realtime;
            }
        } 
    }

    if (m_Side = 1)
    {
        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f);
    }
    else if (m_Side = -1)
    {
        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f);
    }

    if (g_ctx.globals.missed_shots[player->EntIndex()] > 0)
    {
        switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
        {
        case 0:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f);
            break;
        case 1:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f);
            break;
        }
    }
}
resolver h;
class c_resolver
{
public:
    void resolve_yaw(player_t* player);
    int m_Side = 0;
    float last_anims_update_time; 
};
extern c_resolver* resolver;
Фан и без говно кода это разные вещи!!!
 
Сверху Снизу