PrecacheParticleSystem: Difference between revisions
Jump to navigation
Jump to search
Biohazard 90 (talk | contribs) No edit summary |
Biohazard 90 (talk | contribs) m (link) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
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. | PrecacheParticleSystem is a [[function]] provided to [[precache]] [[particle|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. | ||
== Usage == | == Usage == |
Latest revision as of 17:21, 14 April 2011
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.
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" );
}