PrecacheMaterial: Difference between revisions
Jump to navigation
Jump to search
Stoopdapoop (talk | contribs) No edit summary |
Biohazard 90 (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
PrecacheMaterial is a function provided to | PrecacheMaterial is a [[function]] provided to [[precache]] [[material|materials]] by [[string]]. File paths are relative to the mod's "Materials" folder. | ||
Latest revision as of 17:20, 14 April 2011
PrecacheMaterial is a function provided to precache materials by string. File paths are relative to the mod's "Materials" folder.
Usage
//-----------------------------------------------------------------------------
// Purpose: Add material to precache
// Input : *pMaterialName - material name
// Output :
//-----------------------------------------------------------------------------
void PrecacheMaterial( const char *pMaterialName )
Examples
void CFireTrail::Precache( void )
{
PrecacheMaterial( "sprites/flamelet1" );
PrecacheMaterial( "sprites/flamelet2" );
PrecacheMaterial( "particle/particle_smokegrenade" );
PrecacheMaterial( "particle/particle_noisesphere" );
}
void CCitadelEnergyCore::Precache()
{
BaseClass::Precache();
PrecacheMaterial( "effects/combinemuzzle2_dark" );
}