diff --git a/sp/src/game/server/hl2/npc_manhack.cpp b/sp/src/game/server/hl2/npc_manhack.cpp index f04d08cb..f7dd372d 100644 --- a/sp/src/game/server/hl2/npc_manhack.cpp +++ b/sp/src/game/server/hl2/npc_manhack.cpp @@ -764,7 +764,7 @@ int CNPC_Manhack::OnTakeDamage_Alive( const CTakeDamageInfo &info ) m_vForceVelocity = vecBestDir * info.GetDamage() * 0.5f; m_flBladeSpeed = 10.0; - EmitSound( "NPC_Manhack.Bat" ); + PlayDamagedSound(); // tdInfo.SetDamage( 1.0 ); @@ -3155,6 +3155,15 @@ void CNPC_Manhack::PlayAttackSound(bool hostile /*= true*/) } +//----------------------------------------------------------------------------- +// Purpose: Play a sound before charging at the player +//----------------------------------------------------------------------------- +void CNPC_Manhack::PlayDamagedSound(void) +{ + EmitSound("NPC_Manhack.Bat"); +} + + //----------------------------------------------------------------------------- // Purpose: diff --git a/sp/src/game/server/hl2/npc_manhack.h b/sp/src/game/server/hl2/npc_manhack.h index c994469b..4554d56c 100644 --- a/sp/src/game/server/hl2/npc_manhack.h +++ b/sp/src/game/server/hl2/npc_manhack.h @@ -106,6 +106,7 @@ public: virtual void GatherEnemyConditions( CBaseEntity *pEnemy ); virtual void PlayFlySound(void); virtual void PlayAttackSound(bool bHostile); + virtual void PlayDamagedSound(void); virtual void StopLoopingSounds(void); void Precache(void); diff --git a/sp/src/game/server/mod/npc_lost_soul.cpp b/sp/src/game/server/mod/npc_lost_soul.cpp index 29664f7e..154522a2 100644 --- a/sp/src/game/server/mod/npc_lost_soul.cpp +++ b/sp/src/game/server/mod/npc_lost_soul.cpp @@ -93,6 +93,7 @@ public: void MoveToTarget(float flInterval, const Vector &MoveTarget); void PlayAttackSound(bool hostile = true); + void PlayDamagedSound(void); void SetEyeState(int state); DECLARE_DATADESC(); @@ -142,6 +143,7 @@ void CNPC_LostSoul::Precache( void ) PrecacheScriptSound("NPC_LostSoul.ChargeAnnounce"); PrecacheScriptSound("NPC_LostSoul.ChargeEnd"); PrecacheScriptSound("NPC_LostSoul.Stunned"); + PrecacheScriptSound("NPC_LostSoul.Bat"); BaseClass::Precache(); } @@ -506,6 +508,14 @@ void CNPC_LostSoul::PlayAttackSound(bool hostile /*= true*/) } } +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void CNPC_LostSoul::PlayDamagedSound(void) +{ + EmitSound("NPC_LostSoul.Bat"); +} + //----------------------------------------------------------------------------- // Purpose: // Input : state -