void C_PhysPropClientside::Spawn() { // Initialize damage modifiers. Must be done before baseclass spawn. m_flDmgModBullet = 1.0; m_flDmgModClub = 1.0; m_flDmgModExplosive = 1.0; BaseClass::Spawn(); // we don't really precache models here, just checking how many we have: m_iNumBreakableChunks = PropBreakablePrecacheAll( GetModelIndex() ); ParsePropData(); // If we have no custom breakable chunks, see if we're breaking into generic ones if ( !m_iNumBreakableChunks ) { if ( GetBreakableModel() != NULL_STRING && GetBreakableCount() ) { m_iNumBreakableChunks = GetBreakableCount(); } } // Setup takedamage based upon the health we parsed earlier if ( m_iHealth == 0 ) { m_takedamage = DAMAGE_NO; } else { m_takedamage = DAMAGE_YES; } }
void CPhysicsCannister::Precache( void ) { PropBreakablePrecacheAll( GetModelName() ); if ( m_gasSound != NULL_STRING ) { PrecacheScriptSound( STRING(m_gasSound) ); } BaseClass::Precache(); }
void CBlock1x1x2::Precache (void) { PropBreakablePrecacheAll(MAKE_STRING("models/sf/3d_1x2.mdl")); BaseClass::Precache (); }
void CBlock2x3::Precache (void) { PropBreakablePrecacheAll(MAKE_STRING("models/sf/2d_2x3.mdl")); BaseClass::Precache (); }
void CBlock1_5x4::Precache (void) { PropBreakablePrecacheAll(MAKE_STRING("models/sf/2d_1o5x4.mdl")); BaseClass::Precache (); }