From f77fc0eda0f50668c16950cf0e25a159292604c0 Mon Sep 17 00:00:00 2001 From: wazanator Date: Sun, 8 Jun 2014 22:50:55 -0500 Subject: [PATCH] Added suicide notification in all chat Signed-off-by: wazanator --- mp/src/game/shared/multiplay_gamerules.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mp/src/game/shared/multiplay_gamerules.cpp b/mp/src/game/shared/multiplay_gamerules.cpp index abecba9eb1..0b116da69b 100644 --- a/mp/src/game/shared/multiplay_gamerules.cpp +++ b/mp/src/game/shared/multiplay_gamerules.cpp @@ -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(); @@ -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 )