diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_pmove.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index e49bf4c2..a8001ea9 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2762,7 +2762,6 @@ static void PM_BeginWeaponChange( int weapon ) if( pm->ps->weapon == WP_LUCIFER_CANNON ) pm->ps->stats[ STAT_MISC ] = 0; - PM_AddEvent( EV_CHANGE_WEAPON ); pm->ps->weaponstate = WEAPON_DROPPING; pm->ps->weaponTime += 200; pm->ps->persistant[ PERS_NEWWEAPON ] = weapon; @@ -2787,6 +2786,7 @@ static void PM_FinishWeaponChange( void ) { int weapon; + PM_AddEvent( EV_CHANGE_WEAPON ); weapon = pm->ps->persistant[ PERS_NEWWEAPON ]; if( weapon < WP_NONE || weapon >= WP_NUM_WEAPONS ) weapon = WP_NONE; @@ -3023,7 +3023,16 @@ static void PM_Weapon( void ) if( pm->ps->pm_flags & PMF_WEAPON_SWITCH ) { pm->ps->pm_flags &= ~PMF_WEAPON_SWITCH; - PM_BeginWeaponChange( pm->ps->persistant[ PERS_NEWWEAPON ] ); + if( pm->ps->weapon != WP_NONE ) + { + // drop the current weapon + PM_BeginWeaponChange( pm->ps->persistant[ PERS_NEWWEAPON ] ); + } + else + { + // no current weapon, so just raise the new one + PM_FinishWeaponChange( ); + } } } |