PrecacheParticleSystem
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.
Todo: Clarify if this is the .pcf name or the particle name inside the .pcf!
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" );
}