mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-26 22:21:16 +00:00
ref say added
This commit is contained in:
parent
be0de25e1d
commit
0af241ec9c
4 changed files with 30 additions and 2 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.163 2002/08/27 04:48:13 niceass
|
||||
// ref say added
|
||||
//
|
||||
// Revision 1.162 2002/08/24 07:58:49 niceass
|
||||
// moved sanitizestring to g_util
|
||||
//
|
||||
|
@ -1447,11 +1450,12 @@ void G_Say(gentity_t * ent, gentity_t * target, int mode, const char *chatText)
|
|||
Com_sprintf(name, sizeof(name), "[DEAD] %s%c%c" EC ": ", ent->client->pers.netname,
|
||||
Q_COLOR_ESCAPE, COLOR_WHITE);
|
||||
}
|
||||
color = COLOR_GREEN;
|
||||
} else {
|
||||
Com_sprintf(name, sizeof(name), "%s%c%c" EC ": ", ent->client->pers.netname, Q_COLOR_ESCAPE,
|
||||
COLOR_WHITE);
|
||||
}
|
||||
color = COLOR_GREEN;
|
||||
}
|
||||
break;
|
||||
case SAY_TEAM:
|
||||
if (ent->client->sess.sessionTeam == TEAM_SPECTATOR) {
|
||||
|
@ -1492,6 +1496,10 @@ void G_Say(gentity_t * ent, gentity_t * target, int mode, const char *chatText)
|
|||
Q_COLOR_ESCAPE, COLOR_WHITE);
|
||||
color = COLOR_MAGENTA;
|
||||
break;
|
||||
case SAY_REF:
|
||||
Com_sprintf(name, sizeof(name), "[REFEREE] %s%c%c" EC ": ", ent->client->pers.netname,
|
||||
Q_COLOR_ESCAPE, COLOR_WHITE);
|
||||
break;
|
||||
}
|
||||
|
||||
// JBravo: Parsing % vars here
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.119 2002/08/27 04:47:48 niceass
|
||||
// ref say added
|
||||
//
|
||||
// Revision 1.118 2002/08/24 07:58:37 niceass
|
||||
// moved sanitizestring to g_util
|
||||
//
|
||||
|
@ -886,6 +889,7 @@ void Cmd_FollowCycle_f(gentity_t * ent, int dir);
|
|||
void Cmd_Unzoom(gentity_t * ent);
|
||||
void Cmd_OpenDoor(gentity_t * ent);
|
||||
void Cmd_Weapon(gentity_t * ent);
|
||||
void G_Say(gentity_t * ent, gentity_t * target, int mode, const char *chatText);
|
||||
|
||||
//Elder: C3A laser tutorial
|
||||
void Laser_Gen(gentity_t * ent, qboolean enabled);
|
||||
|
|
|
@ -499,7 +499,8 @@ void Ref_Command(gentity_t * ent)
|
|||
{
|
||||
char com[MAX_TOKEN_CHARS];
|
||||
char param[MAX_TOKEN_CHARS];
|
||||
int cn;
|
||||
char arg2[MAX_STRING_CHARS];
|
||||
int cn, i;
|
||||
|
||||
//cn = ent - g_entities;
|
||||
if (!ent->client->sess.referee) {
|
||||
|
@ -520,6 +521,7 @@ void Ref_Command(gentity_t * ent)
|
|||
trap_SendServerCommand(ent - g_entities, "print\"lockSettings\n\"");
|
||||
trap_SendServerCommand(ent - g_entities, "print \"resetMatch\n\"");
|
||||
trap_SendServerCommand(ent - g_entities, "print\"map <map_to_go>\n\"");
|
||||
trap_SendServerCommand(ent - g_entities, "print\"say <text>\n\"");
|
||||
return;
|
||||
} else if (Q_stricmp(com, "resetMatch") == 0) {
|
||||
MM_ResetMatch();
|
||||
|
@ -595,6 +597,16 @@ void Ref_Command(gentity_t * ent)
|
|||
BeginIntermission();
|
||||
}
|
||||
}
|
||||
else if (Q_stricmp(com, "say") == 0) {
|
||||
arg2[0] = '\0';
|
||||
for (i = 2; i < trap_Argc(); i++) {
|
||||
if (i > 2)
|
||||
strcat(arg2, " ");
|
||||
trap_Argv(i, &arg2[strlen(arg2)], sizeof(arg2) - strlen(arg2));
|
||||
}
|
||||
|
||||
G_Say(ent, NULL, SAY_REF, arg2);
|
||||
}
|
||||
else
|
||||
trap_SendServerCommand(ent - g_entities,
|
||||
va("print \""MM_DENY_COLOR"Invalid Referee comand. Type ref help to see a list of available commands\n\""));
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.11 2002/08/27 04:46:33 niceass
|
||||
// ref say added
|
||||
//
|
||||
// Revision 1.10 2002/08/21 03:42:36 niceass
|
||||
// move of some vector functions outside of just game
|
||||
//
|
||||
|
@ -1463,6 +1466,7 @@ typedef enum _flag_status {
|
|||
#define SAY_ALL 0
|
||||
#define SAY_TEAM 1
|
||||
#define SAY_TELL 2
|
||||
#define SAY_REF 3
|
||||
|
||||
#define CDKEY_LEN 16
|
||||
#define CDCHKSUM_LEN 2
|
||||
|
|
Loading…
Reference in a new issue