Исходник Standalone RCS for CSGOSimple

Nike.lua
Олдфаг
Статус
Оффлайн
Регистрация
13 Окт 2020
Сообщения
2,747
Реакции[?]
1,465
Поинты[?]
2K
AUUUUU $$$ SHIT POST $$$ (From Hydraware src)
misc.cpp
C++:
void Misc::RCS(QAngle& angle)
{
    if (!g_LocalPlayer || !g_LocalPlayer->IsAlive())
        return;

    if (!g_Options.aim_rcs_x && !g_Options.aim_rcs_y)
        return;

    if (g_LocalPlayer->m_iShotsFired() < 1)
        return;

    static auto recoil_scale = g_CVar->FindVar("weapon_recoil_scale");
    auto scale = recoil_scale->GetFloat();

    const auto x = float(g_Options.aim_rcs_y) / 100.f * scale;
    const auto y = float(g_Options.aim_rcs_x) / 100.f * scale;

    QAngle current_punch = g_LocalPlayer->m_aimPunchAngle();
    QAngle last_punch = { 0, 0, 0, };
    QAngle punch = { 0, 0, 0 };
    punch = { (current_punch.pitch - last_punch.pitch) * x, (current_punch.yaw - last_punch.yaw) * y, 0 };

    if ((punch.pitch != 0.f || punch.yaw != 0.f) && current_punch.roll == 0.f) {
        angle -= punch;
        Math::Normalize3(angle);
        Math::ClampAngles(angle);
    }
    last_punch = current_punch
}
hooks.cpp (CreateMove hook)
C++:
if ((cmd->buttons & IN_ATTACK) && g_Options.aim_rcs)
    Misc::RCS(cmd->viewangles);
 
Последнее редактирование:
Похожие темы
Сверху Снизу