Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1.  
  2. void BackJitter(CUserCmd* pCmd)
  3. {
  4. int random = rand() % 100;
  5.  
  6. // Small chance of starting fowards
  7. if (random < 98)
  8. // Look backwards
  9. pCmd->viewangles.y -= 180;
  10.  
  11. // Some gitter
  12. if (random < 15)
  13. {
  14. float change = -70 + (rand() % (int)(140 + 1));
  15. pCmd->viewangles.y += change;
  16. }
  17. if (random == 69)
  18. {
  19. float change = -90 + (rand() % (int)(180 + 1));
  20. pCmd->viewangles.y += change;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement