//--------------------------------------------------------- //--------------------------------------------------------- bool CZombie::ShouldBecomeTorso( const CTakeDamageInfo &info, float flDamageThreshold ) { if( IsSlumped() ) { // Never break apart a slouched zombie. This is because the most fun // slouched zombies to kill are ones sleeping leaning against explosive // barrels. If you break them in half in the blast, the force of being // so close to the explosion makes the body pieces fly at ridiculous // velocities because the pieces weigh less than the whole. return false; } return BaseClass::ShouldBecomeTorso( info, flDamageThreshold ); }
//----------------------------------------------------------------------------- // Purpose: Play a random idle sound. //----------------------------------------------------------------------------- void CASW_Zombie::IdleSound( void ) { if( GetState() == NPC_STATE_IDLE && random->RandomFloat( 0, 1 ) == 0 ) { // Moan infrequently in IDLE state. return; } if( IsSlumped() ) { // Sleeping zombies are quiet. return; } EmitSound( "ASW_Zombie.Idle" ); }
void CZombie::IdleSound( void ) { // Moan infrequently in IDLE state. if( GetState() == NPC_STATE_IDLE && random->RandomFloat( 0, 1 ) == 0 ) return; // Sleeping zombies are quiet. if( IsSlumped() ) return; if(m_iZombieType == ZOMBIE_BISOU) EmitSound( "Zombie.Bisou.Idle" ); else EmitSound( "Zombie.Idle" ); MakeAISpookySound( 360.0f ); }