[#11] Add basic death message on PvP kills.

This commit is contained in:
Giegue
2023-03-15 14:09:06 -03:00
parent 5478860f27
commit 3b1c99d2cc

View File

@@ -424,6 +424,16 @@ void check_player_dead( edict_t *pPlayer )
// Suicide? // Suicide?
if ( pAttacker == pPlayer ) if ( pAttacker == pPlayer )
sprintf( szMessage, "* %s commited suicide.\n", szPlayerName ); sprintf( szMessage, "* %s commited suicide.\n", szPlayerName );
// Player killed by another player
else if ( UTIL_IsPlayer( pAttacker ) )
{
// Get attacker name
char szAttackerName[33];
strcpy(szAttackerName, STRING(pAttacker->v.netname));
// Print a very basic death message until we can detect teamkills
sprintf( szMessage, "* %s was killed by %s.\n", szPlayerName, szAttackerName );
}
// An entity killed this player. // An entity killed this player.
else if ( ENTINDEX( pAttacker ) > 0 ) else if ( ENTINDEX( pAttacker ) > 0 )
{ {