Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static QAngle OldAimPunch = QAngle(0, 0, 0);
- if (Vars.Misc.NoRecoil && !Vars.Ragebot.Enabled)
- {
- int activewep = G::LocalPlayer->GetWeapon()->GetWeaponID();
- if (Vars.Misc.NoRecoil && !activewep == WEAPON_NEGEV || !activewep == WEAPON_M249 || !activewep == WEAPON_CZ75A || !activewep == WEAPON_SCAR20 || !activewep == WEAPON_G3SG1);
- {
- if (G::UserCmd->buttons & IN_ATTACK && pLocal->GetShotsFired() > 1)
- {
- CBaseEntity* pLocal = I::ClientEntList->GetClientEntity(I::Engine->GetLocalPlayer());
- // Get the current aim punch angles and multiply the recoil scale.
- auto AimPunch = G::LocalPlayer->GetPunch() *2.0f;
- QAngle Delta = OldAimPunch - AimPunch;
- // Set compensated view angles.
- cmd->viewangles += Delta;
- cmd->viewangles.Clamp();
- // Save old aim punch for next tick.
- OldAimPunch = AimPunch;
- return true;
- }
- else
- {
- // Reset when not firing.
- OldAimPunch.x = OldAimPunch.y = OldAimPunch.z = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement