mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-13 00:24:29 +00:00
Fixed DM scoring message
This commit is contained in:
parent
f5b2003314
commit
a772993171
1 changed files with 6 additions and 20 deletions
|
@ -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 ) {
|
static void CG_DMRewardEvent( entityState_t *ent ) {
|
||||||
|
|
||||||
int mod;
|
int mod;
|
||||||
int target, attacker;
|
int attacker;
|
||||||
char *message;
|
char *message;
|
||||||
char *message2;
|
|
||||||
const char *targetInfo;
|
|
||||||
const char *attackerInfo;
|
const char *attackerInfo;
|
||||||
char targetName[32];
|
|
||||||
char attackerName[32];
|
char attackerName[32];
|
||||||
gender_t gender;
|
// clientInfo_t *ci;
|
||||||
clientInfo_t *ci;
|
|
||||||
|
|
||||||
target = ent->otherEntityNum;
|
|
||||||
attacker = ent->otherEntityNum2;
|
attacker = ent->otherEntityNum2;
|
||||||
mod = ent->eventParm;
|
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 ) {
|
if ( attacker < 0 || attacker >= MAX_CLIENTS ) {
|
||||||
attacker = ENTITYNUM_WORLD;
|
attacker = ENTITYNUM_WORLD;
|
||||||
attackerInfo = NULL;
|
attackerInfo = NULL;
|
||||||
|
@ -1336,13 +1327,8 @@ static void CG_DMRewardEvent( entityState_t *ent ) {
|
||||||
attackerInfo = CG_ConfigString( CS_PLAYERS + attacker );
|
attackerInfo = CG_ConfigString( CS_PLAYERS + attacker );
|
||||||
}
|
}
|
||||||
|
|
||||||
targetInfo = CG_ConfigString( CS_PLAYERS + target );
|
Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2);
|
||||||
if ( !targetInfo ) {
|
strcat( attackerName, S_COLOR_WHITE );
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2);
|
|
||||||
strcat( targetName, S_COLOR_WHITE );
|
|
||||||
if ((mod > 3) && (mod < 8))
|
if ((mod > 3) && (mod < 8))
|
||||||
message = "2";
|
message = "2";
|
||||||
else if (mod < 16)
|
else if (mod < 16)
|
||||||
|
@ -1354,7 +1340,7 @@ static void CG_DMRewardEvent( entityState_t *ent ) {
|
||||||
|
|
||||||
if (message) {
|
if (message) {
|
||||||
CG_Printf( "%s has %d kills in a row and receives %s frags for the kill!\n",
|
CG_Printf( "%s has %d kills in a row and receives %s frags for the kill!\n",
|
||||||
targetName, mod, message);
|
attackerName, mod, message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue