diff options
author | Tim Angus <tim@ngus.net> | 2005-07-19 02:41:01 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2005-07-19 02:41:01 +0000 |
commit | e6cee5e1d9d160cf84e963fceda0261bbf563990 (patch) | |
tree | b7e9af1561e45b802bb3973be83cb96d213945b7 /src/game/bg_misc.c | |
parent | 5dbd741da16c5ab40969f1169b14781deb03ed38 (diff) |
* Added a sound to buying ammo
* Anticamp doesn't kick in unless you actually receive ammo
* Mass driver spawn clips now matches max clips (wtf?)
Diffstat (limited to 'src/game/bg_misc.c')
-rw-r--r-- | src/game/bg_misc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 15361e64..08484549 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -4797,6 +4797,24 @@ void BG_PackAmmoArray( int weapon, int ammo[ ], int ammo2[ ], int quan, int clip /* ======================== +BG_WeaponIsFull + +Check if a weapon has full ammo +======================== +*/ +qboolean BG_WeaponIsFull( weapon_t weapon, int ammo[ ], int ammo2[ ] ) +{ + int maxAmmo, maxClips; + int quan, clips; + + BG_FindAmmoForWeapon( weapon, &maxAmmo, NULL, &maxClips ); + BG_UnpackAmmoArray( weapon, ammo, ammo2, &quan, &clips, NULL ); + + return ( maxAmmo == quan ) && ( maxClips == clips ); +} + +/* +======================== BG_AddWeaponToInventory Give a player a weapon |