From 78a4b4ea5e0299e9b8f3cb25648e6d5477042927 Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Wed, 21 Oct 2009 01:20:13 +0000 Subject: * (bug 3961) Fix the taunt delay to no longer be cancelled by jumping. Note that even with this change it is still possible to spam taunt sounds on the client end due to mispredicts. However, others will not hear/see them. (Thanks kevlarman, Cadynum) --- src/game/bg_pmove.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/game') diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index b7cec16e..005cf46a 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -3406,12 +3406,16 @@ static void PM_Animate( void ) if( pm->cmd.buttons & BUTTON_GESTURE ) { + if( pm->ps->tauntTimer > 0 ) + return; + if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) ) { if( pm->ps->torsoTimer == 0 ) { PM_StartTorsoAnim( TORSO_GESTURE ); pm->ps->torsoTimer = TIMER_GESTURE; + pm->ps->tauntTimer = TIMER_GESTURE; PM_AddEvent( EV_TAUNT ); } @@ -3422,6 +3426,7 @@ static void PM_Animate( void ) { PM_ForceLegsAnim( NSPA_GESTURE ); pm->ps->torsoTimer = TIMER_GESTURE; + pm->ps->tauntTimer = TIMER_GESTURE; PM_AddEvent( EV_TAUNT ); } @@ -3465,6 +3470,16 @@ static void PM_DropTimers( void ) if( pm->ps->torsoTimer < 0 ) pm->ps->torsoTimer = 0; } + + if( pm->ps->tauntTimer > 0 ) + { + pm->ps->tauntTimer -= pml.msec; + + if( pm->ps->tauntTimer < 0 ) + { + pm->ps->tauntTimer = 0; + } + } } -- cgit