diff options
author | Tim Angus <tim@ngus.net> | 2003-08-03 03:18:19 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2003-08-03 03:18:19 +0000 |
commit | 2e997c5598a08c6233948f12d563c682bfa74163 (patch) | |
tree | bc1c87aa2714aa003c48c2ee4d461b9a4b62ddec /src/game | |
parent | 1e888e1694a50d86cc9576cb0af535d297392561 (diff) |
* Weapons dropped when reloading
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_pmove.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 6181e66d..cb5d8162 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2451,7 +2451,7 @@ static void PM_Weapon( void ) return; } - if ( pm->ps->weaponstate == WEAPON_RAISING ) + if( pm->ps->weaponstate == WEAPON_RAISING ) { pm->ps->weaponstate = WEAPON_READY; @@ -2466,7 +2466,7 @@ static void PM_Weapon( void ) BG_unpackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, &ammo, &clips, &maxclips ); // check for out of ammo - if ( !ammo && !clips && !BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) + if( !ammo && !clips && !BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) { PM_AddEvent( EV_NOAMMO ); pm->ps->weaponTime += 200; @@ -2487,12 +2487,21 @@ static void PM_Weapon( void ) ammo = (int)( (float)ammo * BATTPACK_MODIFIER ); BG_packAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, ammo, clips, maxclips ); + + //allow some time for the weapon to be raised + pm->ps->weaponstate = WEAPON_RAISING; + PM_StartTorsoAnim( TORSO_RAISE ); + pm->ps->weaponTime += 250; + return; } // check for end of clip - if ( !ammo && clips ) + if( !ammo && clips ) { pm->ps->weaponstate = WEAPON_RELOADING; + + //drop the weapon + PM_StartTorsoAnim( TORSO_DROP ); addTime = BG_FindReloadTimeForWeapon( pm->ps->weapon ); |