Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

Исходник Simple movement and sliding legs fix

Пользователь
Пользователь
Статус
Оффлайн
Регистрация
3 Янв 2020
Сообщения
162
Реакции
172
as said above
C++:
Expand Collapse Copy
void antiaim::fix_movement(CUserCmd* cmd, QAngle wish_angle)
{
    //get our viewangles for calculations for lator on
    QAngle real_angles;
    g_pEngine->GetViewAngles(real_angles);

    // adjust for roll if we in nospread, no spread is dead but may aswell do this anyway
    if (!(g_pLocalPlayer->m_fFlags() & FL_ONGROUND) && real_angles.z != 0.f)
        cmd->sidemove = 0.f;

    //get our speed from cmd move crap
    Vector m_flMove = Vector{ cmd->forwardmove, cmd->sidemove, cmd->upmove };
    const float m_flVelocity = m_flMove.Length2D();

    //no need fix if we not moving
    if (m_flVelocity == 0.f)
        return;

    //calc our move angles
    QAngle move_angle;
    VectorAngles(m_flMove, move_angle);

    //get our needed yaw
    float yaw = DEG2RAD(cmd->viewangles.y - real_angles.y + move_angle.y);

    //fix our movements with the crap we calculated before
    cmd->forwardmove = cos(yaw) * m_flVelocity;
    cmd->sidemove = sin(yaw) * m_flVelocity;

    //yeah this is a shit way fix leg slide but simple asf u can just do a hook to fix it or something
    //fix our feet animations, doing it here cuz we don't really need fix it if we dont move
    if (g_pLocalPlayer->get_move_type() != MOVETYPE_LADDER)
        cmd->buttons &= ~(IN_FORWARD | IN_BACK | IN_MOVERIGHT | IN_MOVELEFT);
}
 
Последнее редактирование:
а может..... лучше...... нормально фиксить мувмент............

Пожалуйста, авторизуйтесь для просмотра ссылки.

и "sliding legs fix"
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
Expand Collapse Copy
    //yeah this is a shit way fix leg slide but simple asf u can just do a hook to fix it
    //fix our feet animations, doing it here cuz we don't really need fix it if we dont move
    if (g_pLocalPlayer->get_move_type() != MOVETYPE_LADDER)
        cmd->buttons &= ~(IN_FORWARD | IN_BACK | IN_MOVERIGHT | IN_MOVELEFT);
stop posting everything that u pasted on this forum and talking stuff u have no clue abt
leg sliding r related to m_bStrafing and strafe_change layer, how tf u r gonna fix it w/ hook?
also ur fix removes sliding completely even when it should happen in a basic gameplay......
Код:
Expand Collapse Copy
    if (globals::m_cur_cmd->m_move.x != 0.f) {
        globals::m_cur_cmd->m_buttons.add(globals::m_cur_cmd->m_move.x > 0.f ? IN_FORWARD : IN_BACK);
    }
ok....
thats a normal game movement practice, whats wrong with it?
i wondering what will happen with ur paste if valve finally will start checking buttons
 
Последнее редактирование:
stop posting everything that u pasted on this forum and talking stuff u have no clue abt
leg sliding r related to m_bStrafing and strafe_change layer, how tf u r gonna fix it w/ hook?
also urs fix removes sliding completely even when it should happen in a basic gameplay......

thats a normal game movement practice, whats wrong with it?
i wondering what will happen with ur paste if valve finally will start checking buttons
using a phone on this site is so dame aids legit turned on my pc just to fix this reply its 4 am and translate don't even work on my own posts :(
 
Последнее редактирование:
Назад
Сверху Снизу