@@ -7340,41 +7340,41 @@ void CTFPlayerShared::OnAddOverhealed( void )
73407340// -----------------------------------------------------------------------------
73417341void CTFPlayerShared::OnAddStunned ( void )
73427342{
7343- if ( IsControlStunned () || IsLoserStateStunned () )
7343+ if ( GetActiveStunInfo () )
73447344 {
7345+ int iStunFlags = GetStunFlags ();
73457346#ifdef CLIENT_DLL
7346- if ( GetActiveStunInfo ( ) )
7347+ if ( !m_pOuter-> m_pStunnedEffect && !( iStunFlags & TF_STUN_NO_EFFECTS ) )
73477348 {
7348- if ( !m_pOuter-> m_pStunnedEffect && !( GetActiveStunInfo ()-> iStunFlags & TF_STUN_NO_EFFECTS ) )
7349+ if ( ( iStunFlags & TF_STUN_BY_TRIGGER ) || InCond ( TF_COND_HALLOWEEN_BOMB_HEAD ) )
73497350 {
7350- if ( ( GetActiveStunInfo ()->iStunFlags & TF_STUN_BY_TRIGGER ) || InCond ( TF_COND_HALLOWEEN_BOMB_HEAD ) )
7351- {
7352- const char * pEffectName = " yikes_fx" ;
7353- m_pOuter->m_pStunnedEffect = m_pOuter->ParticleProp ()->Create ( pEffectName, PATTACH_POINT_FOLLOW , " head" );
7354- }
7355- else
7356- {
7357- const char * pEffectName = " conc_stars" ;
7358- m_pOuter->m_pStunnedEffect = m_pOuter->ParticleProp ()->Create ( pEffectName, PATTACH_POINT_FOLLOW , " head" );
7359- }
7351+ const char * pEffectName = " yikes_fx" ;
7352+ m_pOuter->m_pStunnedEffect = m_pOuter->ParticleProp ()->Create ( pEffectName, PATTACH_POINT_FOLLOW , " head" );
7353+ }
7354+ else if ( iStunFlags & ( TF_STUN_CONTROLS | TF_STUN_LOSER_STATE | TF_STUN_STUNBALL ) )
7355+ {
7356+ const char * pEffectName = " conc_stars" ;
7357+ m_pOuter->m_pStunnedEffect = m_pOuter->ParticleProp ()->Create ( pEffectName, PATTACH_POINT_FOLLOW , " head" );
73607358 }
73617359 }
73627360#endif
7363-
7364- // Notify our weapon that we have been stunned.
7365- CTFWeaponBase* pWpn = m_pOuter->GetActiveTFWeapon ();
7366- if ( pWpn )
7361+ if ( IsControlStunned () || IsLoserStateStunned () )
73677362 {
7368- pWpn->OnControlStunned ();
7369- }
7363+ // Notify our weapon that we have been stunned.
7364+ CTFWeaponBase* pWpn = m_pOuter->GetActiveTFWeapon ();
7365+ if ( pWpn )
7366+ {
7367+ pWpn->OnControlStunned ();
7368+ }
73707369
7371- if ( InCond ( TF_COND_SHIELD_CHARGE ) )
7372- {
7373- SetDemomanChargeMeter ( 0 );
7374- RemoveCond ( TF_COND_SHIELD_CHARGE );
7375- }
7370+ if ( InCond ( TF_COND_SHIELD_CHARGE ) )
7371+ {
7372+ SetDemomanChargeMeter ( 0 );
7373+ RemoveCond ( TF_COND_SHIELD_CHARGE );
7374+ }
73767375
7377- m_pOuter->TeamFortress_SetSpeed ();
7376+ m_pOuter->TeamFortress_SetSpeed ();
7377+ }
73787378 }
73797379}
73807380
@@ -9874,6 +9874,12 @@ void CTFPlayerShared::StunPlayer( float flTime, float flReductionAmount, int iSt
98749874 if ( GetActiveStunInfo ()->iStunFlags & TF_STUN_CONTROLS || GetActiveStunInfo ()->iStunFlags & TF_STUN_LOSER_STATE )
98759875 {
98769876 m_pOuter->m_angTauntCamera = m_pOuter->EyeAngles ();
9877+ }
9878+
9879+ if ( ( GetActiveStunInfo ()->iStunFlags & TF_STUN_CONTROLS ) ||
9880+ ( GetActiveStunInfo ()->iStunFlags & TF_STUN_LOSER_STATE ) ||
9881+ ( GetActiveStunInfo ()->iStunFlags & TF_STUN_STUNBALL ) )
9882+ {
98779883 m_pOuter->SpeakConceptIfAllowed ( MP_CONCEPT_STUNNED );
98789884 if ( pAttacker )
98799885 {
0 commit comments