summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Schwarz <lakitu7@gmail.com>2009-10-21 01:20:13 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:57 +0000
commit78a4b4ea5e0299e9b8f3cb25648e6d5477042927 (patch)
treef6d42b3e298645dd79a4604c9b10b5d4a321d796
parent9b6ee1b3aca16c2a513ac6c58e9d81942e0e3a4f (diff)
* (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)
-rw-r--r--src/game/bg_pmove.c15
-rw-r--r--src/qcommon/q_shared.h2
2 files changed, 17 insertions, 0 deletions
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;
+ }
+ }
}
diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h
index c37f09d2..6eda5cd8 100644
--- a/src/qcommon/q_shared.h
+++ b/src/qcommon/q_shared.h
@@ -1116,6 +1116,8 @@ typedef struct playerState_s {
int torsoTimer; // don't change low priority animations until this runs out
int torsoAnim; // mask off ANIM_TOGGLEBIT
+ int tauntTimer; // don't allow another taunt until this runs out
+
int weaponAnim; // mask off ANIM_TOGGLEBIT
int movementDir; // a number 0 to 7 that represents the reletive angle