Fixed DM scoring message

This commit is contained in:
Duff Man 2001-07-05 02:22:40 +00:00
parent f5b2003314
commit a772993171

View file

@ -1310,25 +1310,16 @@ Used to display the frag rewards for getting many frags in a row during a DM gam
static void CG_DMRewardEvent( entityState_t *ent ) {
int mod;
int target, attacker;
int attacker;
char *message;
char *message2;
const char *targetInfo;
const char *attackerInfo;
char targetName[32];
char attackerName[32];
gender_t gender;
clientInfo_t *ci;
// clientInfo_t *ci;
target = ent->otherEntityNum;
attacker = ent->otherEntityNum2;
mod = ent->eventParm;
if ( target < 0 || target >= MAX_CLIENTS ) {
CG_Error( "CG_Obituary: target out of range" );
}
ci = &cgs.clientinfo[target];
if ( attacker < 0 || attacker >= MAX_CLIENTS ) {
attacker = ENTITYNUM_WORLD;
attackerInfo = NULL;
@ -1336,13 +1327,8 @@ static void CG_DMRewardEvent( entityState_t *ent ) {
attackerInfo = CG_ConfigString( CS_PLAYERS + attacker );
}
targetInfo = CG_ConfigString( CS_PLAYERS + target );
if ( !targetInfo ) {
return;
}
Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2);
strcat( targetName, S_COLOR_WHITE );
Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2);
strcat( attackerName, S_COLOR_WHITE );
if ((mod > 3) && (mod < 8))
message = "2";
else if (mod < 16)
@ -1354,7 +1340,7 @@ static void CG_DMRewardEvent( entityState_t *ent ) {
if (message) {
CG_Printf( "%s has %d kills in a row and receives %s frags for the kill!\n",
targetName, mod, message);
attackerName, mod, message);
return;
}