Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. void CMiscHacks::BhopMovement(CUserCmd* pCmd, Vector& OrigAng)
  2. {
  3. if (miscconfig.bCircleStrafer)
  4. CircleStrafe(pCmd, OrigAng.y);
  5. static int OldMouseX = OrigAng.y;
  6. int mousedx = OldMouseX - OrigAng.y;
  7. OldMouseX = OrigAng.y;
  8. static Vector LastOrigAng = Normalize(OrigAng);
  9. if (!(hackManager.pLocal()->GetFlags() & FL_ONGROUND) && pCmd->buttons & IN_JUMP)
  10. {
  11. if (!(hackManager.pLocal()->GetFlags() & FL_INWATER))
  12. if (miscconfig.bAutoJump)
  13. pCmd->buttons &= ~IN_JUMP;
  14. if (miscconfig.bAutoStrafe)
  15. {
  16. if (hackManager.pLocal()->GetVelocity().Length2D() == 0 && (pCmd->forwardmove == 0 && pCmd->sidemove == 0))
  17. {
  18. pCmd->forwardmove = 450.f;
  19. }
  20. else if (pCmd->forwardmove == 0 && pCmd->sidemove == 0)
  21. {
  22. if (miscconfig.bAutoStrafe == 0)
  23. {
  24. pCmd->forwardmove = 0.f;
  25. pCmd->sidemove = pCmd->mousedx < 0.0f ? -450.f : 450.f;
  26. }
  27. else
  28. {
  29. if (pCmd->mousedx > 1 || pCmd->mousedx < -1) {
  30. pCmd->sidemove = pCmd->mousedx < 0.0f ? -450.f : 450.f;
  31. }
  32. else {
  33. pCmd->forwardmove = 4200.0f / hackManager.pLocal()->GetVelocity().Length2D();
  34. pCmd->sidemove = (pCmd->command_number % 2) == 0 ? -450.f : 450.f;
  35. if (pCmd->forwardmove > 450.f)
  36. pCmd->forwardmove = 450.f;
  37. }
  38. }
  39. }
  40. }
  41. }
  42. else if (pCmd->buttons & IN_JUMP)
  43. pCmd->forwardmove = 450.f;
  44.  
  45. LastOrigAng.y = Normalize_y(LastOrigAng.y);
  46. LastOrigAng = Normalize(OrigAng);
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement