mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 07:42:15 +00:00
Added [DEAD] tags infront of players names where appropriate and made
the server log conversation like AQ does.
This commit is contained in:
parent
0c8f535612
commit
4846491ea6
1 changed files with 37 additions and 14 deletions
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.54 2002/02/25 17:54:57 jbravo
|
||||
// Added [DEAD] tags infront of players names where appropriate and made
|
||||
// the server log conversation like AQ does.
|
||||
//
|
||||
// Revision 1.53 2002/02/23 18:07:18 slicer
|
||||
// Changed Sniper code and Cam code
|
||||
//
|
||||
|
@ -1023,7 +1027,6 @@ void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText )
|
|||
// don't let text be too long for malicious reasons
|
||||
char text[MAX_SAY_TEXT];
|
||||
char location[64];
|
||||
|
||||
int validation;
|
||||
|
||||
// Elder: validate the client
|
||||
|
@ -1056,25 +1059,45 @@ void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText )
|
|||
mode = SAY_ALL;
|
||||
}
|
||||
|
||||
// JBravo: adding below the [DEAD] tag infront of dead players names.
|
||||
switch ( mode ) {
|
||||
default:
|
||||
case SAY_ALL:
|
||||
G_LogPrintf( "say: %s: %s\n", ent->client->pers.netname, chatText );
|
||||
if (ent->client->sess.sessionTeam == TEAM_SPECTATOR) {
|
||||
Com_sprintf (name, sizeof(name), "[DEAD] %s%c%c"EC": ", ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE );
|
||||
G_LogPrintf( "[DEAD] %s: %s\n", ent->client->pers.netname, chatText );
|
||||
} else {
|
||||
Com_sprintf (name, sizeof(name), "%s%c%c"EC": ", ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE );
|
||||
G_LogPrintf( "%s: %s\n", ent->client->pers.netname, chatText );
|
||||
}
|
||||
color = COLOR_GREEN;
|
||||
break;
|
||||
case SAY_TEAM:
|
||||
G_LogPrintf( "sayteam: %s: %s\n", ent->client->pers.netname, chatText );
|
||||
if (ent->client->sess.sessionTeam == TEAM_SPECTATOR) {
|
||||
if (Team_GetLocationMsg(ent, location, sizeof(location)))
|
||||
Com_sprintf (name, sizeof(name), EC"[DEAD] (%s%c%c"EC") (%s)"EC": ",
|
||||
ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location);
|
||||
else
|
||||
Com_sprintf (name, sizeof(name), EC"[DEAD] (%s%c%c"EC")"EC": ",
|
||||
ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE );
|
||||
G_LogPrintf( "[DEAD] (%s): %s\n", ent->client->pers.netname, chatText );
|
||||
} else {
|
||||
if (Team_GetLocationMsg(ent, location, sizeof(location)))
|
||||
Com_sprintf (name, sizeof(name), EC"(%s%c%c"EC") (%s)"EC": ",
|
||||
ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location);
|
||||
else
|
||||
Com_sprintf (name, sizeof(name), EC"(%s%c%c"EC")"EC": ",
|
||||
ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE );
|
||||
G_LogPrintf( "(%s): %s\n", ent->client->pers.netname, chatText );
|
||||
}
|
||||
color = COLOR_CYAN;
|
||||
break;
|
||||
case SAY_TELL:
|
||||
if (target && g_gametype.integer >= GT_TEAM &&
|
||||
if (target && g_gametype.integer == GT_TEAMPLAY &&
|
||||
target->client->sess.savedTeam == ent->client->sess.savedTeam &&
|
||||
Team_GetLocationMsg(ent, location, sizeof(location)))
|
||||
Com_sprintf (name, sizeof(name), EC"[%s%c%c"EC"] (%s)"EC": ", ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location );
|
||||
else if (target && g_gametype.integer >= GT_TEAM &&
|
||||
target->client->sess.sessionTeam == ent->client->sess.sessionTeam &&
|
||||
Team_GetLocationMsg(ent, location, sizeof(location)))
|
||||
Com_sprintf (name, sizeof(name), EC"[%s%c%c"EC"] (%s)"EC": ", ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location );
|
||||
|
|
Loading…
Reference in a new issue