PrecacheParticleSystem

From Valve Developer Community
Revision as of 13:40, 10 April 2011 by Foda (talk | contribs) (Created page with 'PrecacheMaterial is a function provided to Precache particle effects by string. It is generally used to precache specific particle systems rather than every system in a particle …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PrecacheMaterial is a function provided to Precache particle effects by string. It is generally used to precache specific particle systems rather than every system in a particle file.


Usage

//-----------------------------------------------------------------------------
// Precaches a particle system
//-----------------------------------------------------------------------------
void PrecacheParticleSystem( const char *pParticleSystemName )
{
	g_pStringTableParticleEffectNames->AddString( false, pParticleSystemName );
	g_pParticleSystemMgr->PrecacheParticleSystem( pParticleSystemName );
}


Examples

void CWeaponSMG1::Precache( void )
{
	PrecacheParticleSystem( "muzzle_smg1" );
}