Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. //jitter desync
  2. bool SideJitter = false;
  3. auto max_rotate = g_LocalPlayer->GetMaxRotation();
  4. if (Global::bSendPacket) {
  5. auto max_rotate = g_LocalPlayer->GetMaxRotation();
  6. static bool side_switch = false;
  7. side_switch = !side_switch;
  8. if (!side_switch) {
  9. SideJitter = true;
  10. usercmd->viewangles.yaw += 180.f + max_rotate / 2;
  11. }
  12. else {
  13. SideJitter = false;
  14. usercmd->viewangles.yaw -= 0.f + max_rotate / 2;
  15. }
  16. }
  17. if (!Global::bSendPacket) {
  18. if (SideJitter) {
  19. usercmd->viewangles.yaw += max_rotate / 2;
  20. }
  21. else
  22. usercmd->viewangles.yaw += 180 - max_rotate / 2;
  23. }
  24. usercmd->viewangles.yaw = Math::ClampYaw(usercmd->viewangles.yaw);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement