Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. int lastAmmo = 0;
  2. int curAmmo = 0;
  3.  
  4. while (true)
  5. {
  6. lastAmmo = curAmmo;
  7. curAmmo = memory.readAmmo();
  8.  
  9. lastGun = curGun;
  10. curGun = memory.readGun();
  11.  
  12. //Gun not changed
  13. if (lastGun == curGun)
  14. {
  15. //Shots have been fired
  16. if (lastAmmo != curAmmo)
  17. {
  18. shotsFired = lastAmmo - curAmmo;
  19.  
  20. handleRecoil(curGun, shotsFired);
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement