//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void DispatchEffectToCallback( const char *pEffectName, const CEffectData &m_EffectData ) { for ( CClientEffectRegistration *pReg = CClientEffectRegistration::s_pHead; pReg; pReg = pReg->m_pNext ) { if ( stricmp( pReg->m_pEffectName, pEffectName ) == 0 ) { pReg->m_pFunction( m_EffectData ); } } }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void DispatchEffectToCallback( const char *pEffectName, const CEffectData &m_EffectData ) { // Look through all the registered callbacks for ( CClientEffectRegistration *pReg = CClientEffectRegistration::s_pHead; pReg; pReg = pReg->m_pNext ) { // If the name matches, call it if ( Q_stricmp( pReg->m_pEffectName, pEffectName ) == 0 ) { pReg->m_pFunction( m_EffectData ); return; } } DevMsg("DispatchEffect: effect '%s' not found on client\n", pEffectName ); }