Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Little bondage play here
- void W_BoundAmmo(entity who)
- {
- float i;
- for(i = 0; i < 11; i++)
- who.ammo[i] = bound(0, who.ammo[i], MAX_AMMO[i]);
- };
- // Alternating Current
- void W_SetCurrentAmmo(entity who)
- {
- float d, c;
- d = who.ready_weapon; c = -1;
- do {c++;} while((d /= 2) >= 1);
- W_BoundAmmo(who);
- who.currentammo = who.ammo[c];
- };
- // alternatively in batcave...
- //do { /*nothing*/ } while( /*others do all the work*/ (c++, d /= 2) >= 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement