From Valve Developer Community
Revision as of 00:21, 15 April 2011 by Biohazard 90 (talk | contribs) (link)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PrecacheParticleSystem is a function provided to precache particle effects by string. Make sure to specify the name of the actual particle effect and not the name of the .pcf file. All child systems in question will be precached as well.


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


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