summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2007-09-22 22:39:03 +0000
committerTim Angus <tim@ngus.net>2007-09-22 22:39:03 +0000
commita0d2fd3ce21bc91b5d715ee60e1df2a463168350 (patch)
tree2fef7235284b104f0a57e14b7fe3e12838883d64 /src/cgame
parent6eb2ff79c06c6d5acab3070937a680ff3494ba50 (diff)
* (bug 3309) Fix to angle clamping (/dev/humancontroller)
* (bug 3298) Boosters still heal and give poison when dead (David Severwright) * (bug 3070) Check map rotation targets exist during compilation * (bug 3282) Add missing terminating ^7 to chatText (Ben Millwood) * (bug 3357) Extend obituary name length to MAX_NAME_LENGTH (Rocinante)
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_event.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c
index 07bcea9f..613c7ab3 100644
--- a/src/cgame/cg_event.c
+++ b/src/cgame/cg_event.c
@@ -39,8 +39,8 @@ static void CG_Obituary( entityState_t *ent )
char *message2;
const char *targetInfo;
const char *attackerInfo;
- char targetName[ 32 ];
- char attackerName[ 32 ];
+ char targetName[ MAX_NAME_LENGTH ];
+ char attackerName[ MAX_NAME_LENGTH ];
char className[ 64 ];
gender_t gender;
clientInfo_t *ci;
@@ -72,8 +72,7 @@ static void CG_Obituary( entityState_t *ent )
if( !targetInfo )
return;
- Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof( targetName ) - 2 );
- strcat( targetName, S_COLOR_WHITE );
+ Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof( targetName ));
message2 = "";
@@ -182,7 +181,7 @@ static void CG_Obituary( entityState_t *ent )
if( message )
{
- CG_Printf( "%s %s.\n", targetName, message );
+ CG_Printf( "%s" S_COLOR_WHITE " %s.\n", targetName, message );
return;
}
@@ -194,8 +193,7 @@ static void CG_Obituary( entityState_t *ent )
}
else
{
- Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof( attackerName ) - 2);
- strcat( attackerName, S_COLOR_WHITE );
+ Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof( attackerName ));
// check for kill messages about the current clientNum
if( target == cg.snap->ps.clientNum )
Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) );
@@ -329,7 +327,7 @@ static void CG_Obituary( entityState_t *ent )
if( message )
{
- CG_Printf( "%s %s %s%s%s\n",
+ CG_Printf( "%s" S_COLOR_WHITE " %s %s%s%s\n",
targetName, message,
( teamKill ) ? S_COLOR_RED "TEAMMATE " S_COLOR_WHITE : "",
attackerName, message2 );