Skip to content

Commit

Permalink
Show death message and change death sound.
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon committed Jan 3, 2024
1 parent 5f53cbc commit a11a37f
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,31 +332,42 @@ int TrainSpeed( int iSpeed, int iMax )

void CBasePlayer::DeathSound( void )
{
// water death sounds
/*
if( pev->waterlevel == 3 )
{
EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/h2odeath.wav", 1, ATTN_NONE );
return;
}
*/
const char *pszMessage;

// temporarily using pain sounds for death sounds
switch( RANDOM_LONG( 1, 5 ) )
EMIT_SOUND( ENT( pev ), CHAN_VOICE, "ambience/wind1.wav", 1, ATTN_NORM );

switch( RANDOM_LONG( 1, 9 ) - 1 )
{
case 1:
EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/pl_pain5.wav", 1, ATTN_NORM );
case 0:
pszMessage = "YOU DENSE FUCK";
break;
case 2:
EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/pl_pain6.wav", 1, ATTN_NORM );
case 1:
pszMessage = "YOU FUCKING RETARD!";
break;
case 3:
EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/pl_pain7.wav", 1, ATTN_NORM );
case 2:
pszMessage = "HOLY FUCKING SHIT SERIOUSLY";
break;
case 3:
pszMessage = "OH MY GOD YOU SUCK! AUTO-UNINSTALLING";
break;
case 4:
pszMessage = "YOU DIED! CONGRATS FUCKFACE";
break;
case 5:
pszMessage = "HOW DO YOU FUCK UP SO BADLY JESUS FUCKING CHRIST?";
break;
case 6:
pszMessage = "HOW THE HELL ARE YOU SO BAD AT THIS GAME?";
break;
case 7:
pszMessage = "GAME OVER MOTHERFUCKER! YOU SUCK!";
break;
case 8:
pszMessage = "YOU USELESS SHITSTAIN";
break;
}

// play one of the suit death alarms
EMIT_GROUPNAME_SUIT( ENT( pev ), "HEV_DEAD" );
UTIL_CenterPrintAll( pszMessage );
}

// override takehealth
Expand Down

0 comments on commit a11a37f

Please sign in to comment.