//----------------------------------------------------------------------------- // Purpose: // Input : bool - //----------------------------------------------------------------------------- void C_TEExplosion::PostDataUpdate( DataUpdateType_t updateType ) { RecordExplosion(); AffectRagdolls(); // Filter out a water explosion if ( UTIL_PointContents( m_vecOrigin, MASK_WATER ) & CONTENTS_WATER ) { WaterExplosionEffect().Create( m_vecOrigin, m_nMagnitude, m_fScale, m_nFlags ); return; } if ( !( m_nFlags & TE_EXPLFLAG_NOFIREBALL ) ) { if ( CExplosionOverlay *pOverlay = new CExplosionOverlay ) { pOverlay->m_flLifetime = 0; pOverlay->m_vPos = m_vecOrigin; pOverlay->m_nSprites = 1; pOverlay->m_vBaseColors[0].Init( 1.0f, 0.9f, 0.7f ); pOverlay->m_Sprites[0].m_flHorzSize = 0.05f; pOverlay->m_Sprites[0].m_flVertSize = pOverlay->m_Sprites[0].m_flHorzSize*0.5f; pOverlay->Activate(); } } BaseExplosionEffect().Create( m_vecOrigin, m_nMagnitude, m_fScale, m_nFlags ); }
//----------------------------------------------------------------------------- // Purpose: Intercepts the water explosion dispatch effect //----------------------------------------------------------------------------- void WaterSurfaceExplosionCallback( const CEffectData &data ) { WaterExplosionEffect().Create( data.m_vOrigin, data.m_flMagnitude, data.m_flScale, data.m_fFlags ); }