Permalink
Browse files

Fix another instance of too many format specifiers in a string

  • Loading branch information...
1 parent 70d0ed0 commit 996b3c56c7f20e63f3ec6bdaa6ac507cabd92f81 @DolceTriade DolceTriade committed Feb 22, 2016
Showing with 9 additions and 13 deletions.
  1. +9 −13 src/cgame/cg_event.cpp
@@ -511,17 +511,6 @@ static void CG_Obituary( entityState_t *ent )
if ( message )
{
- // shouldn't need to do this here, but it avoids
- char attackerClassName[ 64 ];
-
- if ( attackerClass == -1 )
- {
- *attackerClassName = 0;
- }
- else
- {
- Q_strncpyz( attackerClassName, _( BG_ClassModelConfig( attackerClass )->humanName ), sizeof( attackerClassName ) );
- }
// Argument order: victim, attacker, [class,] [assistant]. Each has team tag first.
if ( messageSuicide && attacker == target )
@@ -532,7 +521,7 @@ static void CG_Obituary( entityState_t *ent )
{
if ( attackerClass != -1 )
{
- Log::Notice( messageAssisted, teamTag[ ci->team ], targetName, teamTag[ attackerTeam ], attackerName, attackerClassName, teamTag[ assistantTeam ], assistantName );
+ Log::Notice( messageAssisted, teamTag[ ci->team ], targetName, teamTag[ attackerTeam ], attackerName, BG_ClassModelConfig( attackerClass )->humanName, teamTag[ assistantTeam ], assistantName );
}
else
{
@@ -541,7 +530,14 @@ static void CG_Obituary( entityState_t *ent )
}
else
{
- Log::Notice( message, teamTag[ ci->team ], targetName, teamTag[ attackerTeam ], attackerName );
+ if ( attackerClass != -1 )
+ {
+ Log::Notice( message, teamTag[ ci->team ], targetName, teamTag[ attackerTeam ], attackerName, BG_ClassModelConfig( attackerClass )->humanName );
+ }
+ else
+ {
+ Log::Notice( message, teamTag[ ci->team ], targetName, teamTag[ attackerTeam ], attackerName );
+ }
}
if ( attackerTeam == ci->team && attacker == cg.clientNum && attacker != target )

0 comments on commit 996b3c5

Please sign in to comment.