summaryrefslogtreecommitdiff
path: root/src/game/bg_misc.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-07-19 02:41:01 +0000
committerTim Angus <tim@ngus.net>2005-07-19 02:41:01 +0000
commite6cee5e1d9d160cf84e963fceda0261bbf563990 (patch)
treeb7e9af1561e45b802bb3973be83cb96d213945b7 /src/game/bg_misc.c
parent5dbd741da16c5ab40969f1169b14781deb03ed38 (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.c18
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