//========================================================= // Materialize - make a CBasePlayerItem visible and tangible //========================================================= void CBasePlayerItem::Materialize( void ) { if ( pev->effects & EF_NODRAW ) { // changing from invisible state to visible. EMIT_SOUND_DYN( ENT(pev), CHAN_WEAPON, "items/suitchargeok1.wav", 1, ATTN_NORM, 0, 150 ); pev->effects &= ~EF_NODRAW; pev->effects |= EF_MUZZLEFLASH; } pev->solid = SOLID_TRIGGER; UTIL_SetOrigin( pev, pev->origin );// link into world. SetTouch (DefaultTouch); ResetThink( ); }
void CASW_Target_Dummy::Spawn() { BaseClass::Spawn(); //SetModelName( AllocPooledString( ASW_TARGET_DUMMY_MODEL ) ); Precache(); SetModel( ASW_TARGET_DUMMY_MODEL ); SetMoveType( MOVETYPE_NONE ); SetSolid( SOLID_VPHYSICS ); SetCollisionGroup( COLLISION_GROUP_NONE ); //COLLISION_GROUP_DEBRIS ); m_takedamage = DAMAGE_YES; m_iHealth = 100; m_iMaxHealth = m_iHealth; AddFlag( FL_STATICPROP ); VPhysicsInitStatic(); ResetThink(); }