%CompilePassBullets
(Redirected from %compilepassbullets)
Jump to navigation
Jump to search
For models, see $contents grate.
Adding this VMT parameter to a material to make VBSP flag the brush contents as CONTENTS_GRATE, causing the brush to be non-solid to hitscan traces, such as bullets. Useful for foliage or metal grates.


Example code:
if ( ( propVal = GetMaterialVar( matID, "%compileClipYesDraw" ) ) && StringIsTrue( propVal ) )
{
// like %compilePassBullets, but works in CS:S and TF2
// NOTE: This has effects on visibility too!
textureref[i].contents &= ~CONTENTS_SOLID;
textureref[i].contents |= CONTENTS_PLAYERCLIP | CONTENTS_MONSTERCLIP;
}
