From 061c247375c8aac977a3588a1dfb2382634da80e Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sun, 2 Jul 2006 15:55:55 +0000 Subject: * Obituaries that indicate team kills (tjw) * g_mapConfigs no longer replaces maprotation.cfg settings (tjw) --- src/cgame/cg_event.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/cgame') diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 7050f14d..bddc3a61 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -44,6 +44,7 @@ static void CG_Obituary( entityState_t *ent ) char className[ 64 ]; gender_t gender; clientInfo_t *ci; + qboolean teamKill = qfalse; target = ent->otherEntityNum; attacker = ent->otherEntityNum2; @@ -60,7 +61,11 @@ static void CG_Obituary( entityState_t *ent ) attackerInfo = NULL; } else + { attackerInfo = CG_ConfigString( CS_PLAYERS + attacker ); + if( ci && cgs.clientinfo[ attacker ].team == ci->team ) + teamKill = qtrue; + } targetInfo = CG_ConfigString( CS_PLAYERS + target ); @@ -324,8 +329,16 @@ static void CG_Obituary( entityState_t *ent ) if( message ) { - CG_Printf( "%s %s %s%s\n", - targetName, message, attackerName, message2 ); + CG_Printf( "%s %s %s%s%s\n", + targetName, message, + ( teamKill ) ? S_COLOR_RED "TEAMMATE " S_COLOR_WHITE : "", + attackerName, message2 ); + if( teamKill && attacker == cg.clientNum ) + { + CG_CenterPrint( va ( "You killed " S_COLOR_RED "TEAMMATE " + S_COLOR_WHITE "%s", targetName ), + SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); + } return; } } -- cgit