Skip to content

Commit

Permalink
Added suicide notification in all chat
Browse files Browse the repository at this point in the history
Signed-off-by: wazanator <[email protected]>
  • Loading branch information
Wazanator committed Jun 9, 2014
1 parent e00297f commit f77fc0e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mp/src/game/shared/multiplay_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,8 @@ ConVarRef suitcharger( "sk_suitcharger" );
void CMultiplayRules::PlayerKilled( CBasePlayer *pVictim, const CTakeDamageInfo &info )
{
DeathNotice( pVictim, info );
const char *suiciders_name = "Bob";
char suicideBuffer[256];

// Find the killer & the scorer
CBaseEntity *pInflictor = info.GetInflictor();
Expand All @@ -772,6 +774,11 @@ ConVarRef suitcharger( "sk_suitcharger" );
{
// Players lose a frag for killing themselves
pVictim->IncrementFragCount( -1 );
//Added custom suicide message to chat --wazanator
suiciders_name = pVictim->GetPlayerName();
strcpy(suicideBuffer, suiciders_name);
strcat(suicideBuffer, " offed themselves!");
UTIL_SayTextAll(suicideBuffer);
}
}
else if ( pScorer )
Expand Down

0 comments on commit f77fc0e

Please sign in to comment.