Skip to content

Commit 832a04a

Browse files
committed
Allow HL2MP player to use response system for death sound instead of hardcoded soundscripts
1 parent 9761d3a commit 832a04a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/game/server/hl2mp/hl2mp_player.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,9 @@ void CHL2MP_Player::DeathSound( const CTakeDamageInfo &info )
14871487
if ( m_hRagdoll && m_hRagdoll->GetBaseAnimating()->IsDissolving() )
14881488
return;
14891489

1490+
#ifdef HL2MP_PLAYER_USES_RESPONSE_SYSTEM
1491+
Speak( TLK_DEATH );
1492+
#else
14901493
char szStepSound[128];
14911494

14921495
Q_snprintf( szStepSound, sizeof( szStepSound ), "%s.Die", GetPlayerModelSoundPrefix() );
@@ -1512,6 +1515,7 @@ void CHL2MP_Player::DeathSound( const CTakeDamageInfo &info )
15121515
ep.m_pOrigin = &vecOrigin;
15131516

15141517
EmitSound( filter, entindex(), ep );
1518+
#endif
15151519
}
15161520

15171521
CBaseEntity* CHL2MP_Player::EntSelectSpawnPoint( void )

src/game/server/hl2mp/hl2mp_player.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ class CHL2MP_Player;
2020
#include "hl2mp_gamerules.h"
2121
#include "utldict.h"
2222

23+
#ifdef MAPBASE
24+
#define HL2MP_PLAYER_USES_RESPONSE_SYSTEM 1
25+
#endif
26+
2327
//=============================================================================
2428
// >> HL2MP_Player
2529
//=============================================================================

0 commit comments

Comments
 (0)