Show death message and change death sound.

This commit is contained in:
Andrey Akhmichin 2024-01-04 01:42:12 +05:00
parent 5f53cbc2f3
commit a11a37f985

View File

@ -332,31 +332,42 @@ int TrainSpeed( int iSpeed, int iMax )
void CBasePlayer::DeathSound( void ) void CBasePlayer::DeathSound( void )
{ {
// water death sounds const char *pszMessage;
/*
if( pev->waterlevel == 3 )
{
EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/h2odeath.wav", 1, ATTN_NONE );
return;
}
*/
// temporarily using pain sounds for death sounds EMIT_SOUND( ENT( pev ), CHAN_VOICE, "ambience/wind1.wav", 1, ATTN_NORM );
switch( RANDOM_LONG( 1, 5 ) )
switch( RANDOM_LONG( 1, 9 ) - 1 )
{ {
case 1: case 0:
EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/pl_pain5.wav", 1, ATTN_NORM ); pszMessage = "YOU DENSE FUCK";
break; break;
case 2: case 1:
EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/pl_pain6.wav", 1, ATTN_NORM ); pszMessage = "YOU FUCKING RETARD!";
break; break;
case 3: case 2:
EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/pl_pain7.wav", 1, ATTN_NORM ); 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; break;
} }
// play one of the suit death alarms UTIL_CenterPrintAll( pszMessage );
EMIT_GROUPNAME_SUIT( ENT( pev ), "HEV_DEAD" );
} }
// override takehealth // override takehealth