Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int lastAmmo = 0;
- int curAmmo = 0;
- while (true)
- {
- lastAmmo = curAmmo;
- curAmmo = memory.readAmmo();
- lastGun = curGun;
- curGun = memory.readGun();
- //Gun not changed
- if (lastGun == curGun)
- {
- //Shots have been fired
- if (lastAmmo != curAmmo)
- {
- shotsFired = lastAmmo - curAmmo;
- handleRecoil(curGun, shotsFired);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement