summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-10-03 13:11:48 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:33 +0000
commita9749dbd524a0dd47b917e4d489519d8fdbaf30e (patch)
treeb62ed6a1b17cac33116e399c82343c236d1d8b5c
parent79b48fc1d21e3863a0168a426a63779e81104f7a (diff)
Remove some unused code
-rw-r--r--src/game/bg_pmove.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index b6c5fcd6..20512535 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -2839,7 +2839,6 @@ Generates weapon events and modifes the weapon counter
static void PM_Weapon( void )
{
int addTime = 200; //default addTime - should never be used
- int maxClips;
qboolean attack1 = pm->cmd.buttons & BUTTON_ATTACK;
qboolean attack2 = pm->cmd.buttons & BUTTON_ATTACK2;
qboolean attack3 = pm->cmd.buttons & BUTTON_USE_HOLDABLE;
@@ -3063,8 +3062,6 @@ static void PM_Weapon( void )
return;
}
- maxClips = BG_Weapon( pm->ps->weapon )->maxClips;
-
// check for out of ammo
if( !pm->ps->ammo && !pm->ps->clips && !BG_Weapon( pm->ps->weapon )->infiniteAmmo )
{
@@ -3085,11 +3082,8 @@ static void PM_Weapon( void )
//done reloading so give em some ammo
if( pm->ps->weaponstate == WEAPON_RELOADING )
{
- if( maxClips > 0 )
- {
- pm->ps->clips--;
- pm->ps->ammo = BG_Weapon( pm->ps->weapon )->maxAmmo;
- }
+ pm->ps->clips--;
+ pm->ps->ammo = BG_Weapon( pm->ps->weapon )->maxAmmo;
if( BG_Weapon( pm->ps->weapon )->usesEnergy &&
BG_InventoryContainsUpgrade( UP_BATTPACK, pm->ps->stats ) )