mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-13 08:27:42 +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$
|
// $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
|
// Revision 1.53 2002/02/23 18:07:18 slicer
|
||||||
// Changed Sniper code and Cam code
|
// 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
|
// don't let text be too long for malicious reasons
|
||||||
char text[MAX_SAY_TEXT];
|
char text[MAX_SAY_TEXT];
|
||||||
char location[64];
|
char location[64];
|
||||||
|
|
||||||
int validation;
|
int validation;
|
||||||
|
|
||||||
// Elder: validate the client
|
// 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;
|
mode = SAY_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// JBravo: adding below the [DEAD] tag infront of dead players names.
|
||||||
switch ( mode ) {
|
switch ( mode ) {
|
||||||
default:
|
default:
|
||||||
case SAY_ALL:
|
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 );
|
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;
|
color = COLOR_GREEN;
|
||||||
break;
|
break;
|
||||||
case SAY_TEAM:
|
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)))
|
if (Team_GetLocationMsg(ent, location, sizeof(location)))
|
||||||
Com_sprintf (name, sizeof(name), EC"(%s%c%c"EC") (%s)"EC": ",
|
Com_sprintf (name, sizeof(name), EC"(%s%c%c"EC") (%s)"EC": ",
|
||||||
ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location);
|
ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location);
|
||||||
else
|
else
|
||||||
Com_sprintf (name, sizeof(name), EC"(%s%c%c"EC")"EC": ",
|
Com_sprintf (name, sizeof(name), EC"(%s%c%c"EC")"EC": ",
|
||||||
ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE );
|
ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE );
|
||||||
|
G_LogPrintf( "(%s): %s\n", ent->client->pers.netname, chatText );
|
||||||
|
}
|
||||||
color = COLOR_CYAN;
|
color = COLOR_CYAN;
|
||||||
break;
|
break;
|
||||||
case SAY_TELL:
|
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 &&
|
target->client->sess.sessionTeam == ent->client->sess.sessionTeam &&
|
||||||
Team_GetLocationMsg(ent, location, sizeof(location)))
|
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 );
|
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