From a9749dbd524a0dd47b917e4d489519d8fdbaf30e Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Sat, 3 Oct 2009 13:11:48 +0000 Subject: Remove some unused code --- src/game/bg_pmove.c | 10 ++-------- 1 file 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 ) ) -- cgit