mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 07:42:15 +00:00
Future 2.1 Matchmode Features - PART I
This commit is contained in:
parent
eb0b144bf0
commit
4d531670ee
4 changed files with 77 additions and 0 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.136 2002/06/20 18:40:17 slicer
|
||||
// Future 2.1 Matchmode Features - PART I
|
||||
//
|
||||
// Revision 1.135 2002/06/20 02:27:30 jbravo
|
||||
// Now the scoreboard doesnt show whos alive and whos not when you are alive
|
||||
//
|
||||
|
@ -1467,6 +1470,10 @@ static void Cmd_Say_f(gentity_t * ent, int mode, qboolean arg0)
|
|||
p = ConcatArgs(1);
|
||||
}
|
||||
|
||||
//Slicer Matchmode
|
||||
if(g_RQ3_matchmode.integer && g_RQ3_forceteamtalk.integer == 2 && (ent->client->sess.captain == TEAM_FREE && ent - g_entities != g_RQ3_RefID.integer))
|
||||
mode = SAY_TEAM; // Force say_team for non captains / refs
|
||||
|
||||
G_Say(ent, NULL, mode, p);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.98 2002/06/20 18:40:17 slicer
|
||||
// Future 2.1 Matchmode Features - PART I
|
||||
//
|
||||
// Revision 1.97 2002/06/19 18:13:57 jbravo
|
||||
// New TNG spawning system :)
|
||||
//
|
||||
|
@ -733,6 +736,7 @@ typedef struct {
|
|||
qboolean team2ready;
|
||||
qboolean inGame;
|
||||
qboolean paused;
|
||||
qboolean settingsLocked;
|
||||
// JBravo adding TP
|
||||
int lights_camera_action;
|
||||
qboolean team_round_going;
|
||||
|
@ -1204,6 +1208,7 @@ extern vmCvar_t g_proxMineTimeout;
|
|||
|
||||
//Slicer: Matchmode
|
||||
extern vmCvar_t g_RQ3_matchmode;
|
||||
extern vmCvar_t g_RQ3_forceteamtalk;
|
||||
|
||||
//Blaze: Reaction cvars
|
||||
extern vmCvar_t g_rxn_knifelimit;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.92 2002/06/20 18:40:17 slicer
|
||||
// Future 2.1 Matchmode Features - PART I
|
||||
//
|
||||
// Revision 1.91 2002/06/19 18:13:57 jbravo
|
||||
// New TNG spawning system :)
|
||||
//
|
||||
|
@ -308,6 +311,7 @@ vmCvar_t g_listEntity;
|
|||
|
||||
//Slicer: Matchmode
|
||||
vmCvar_t g_RQ3_matchmode;
|
||||
vmCvar_t g_RQ3_forceteamtalk;
|
||||
|
||||
//Blaze: Reaction cvars
|
||||
vmCvar_t g_rxn_knifelimit;
|
||||
|
@ -448,6 +452,7 @@ static cvarTable_t gameCvarTable[] = {
|
|||
{&g_rankings, "g_rankings", "0", 0, 0, qfalse},
|
||||
//Slicer: Matchmode
|
||||
{&g_RQ3_matchmode, "g_RQ3_matchmode", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_SYSTEMINFO, 0, qfalse},
|
||||
{&g_RQ3_forceteamtalk, "g_RQ3_forceteamtalk", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
//Slicer: radio protect
|
||||
{&g_RQ3_radioFlood, "g_RQ3_radioFlood", "3", 0, 0, qfalse},
|
||||
{&g_RQ3_radioFloodTime, "g_RQ3_radioFloodTime", "2", 0, 0, qfalse},
|
||||
|
@ -993,6 +998,8 @@ void G_InitGame(int levelTime, int randomSeed, int restart)
|
|||
level.inGame = qfalse;
|
||||
level.team1ready = qfalse;
|
||||
level.team2ready = qfalse;
|
||||
level.paused = qfalse;
|
||||
level.settingsLocked = qfalse;
|
||||
refVotes[0] = refVotes[1] = -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -432,6 +432,13 @@ void Ref_Command(gentity_t * ent)
|
|||
trap_SendServerCommand(ent - g_entities, "print \"clearscores\n\"");
|
||||
trap_SendServerCommand(ent - g_entities, "print \"pause\n\"");
|
||||
trap_SendServerCommand(ent - g_entities, "print \"cyclemap\n\"");
|
||||
trap_SendServerCommand(ent - g_entities, "print\"lockSettings\n\"");
|
||||
return;
|
||||
} else if (Q_stricmp(com, "lockSettings") == 0) {
|
||||
if(level.settingsLocked)
|
||||
level.settingsLocked = qfalse;
|
||||
else
|
||||
level.settingsLocked = qtrue;
|
||||
return;
|
||||
} else if (Q_stricmp(com, "kick") == 0) { // kick kick kick
|
||||
trap_Argv(2, com, sizeof(com));
|
||||
|
@ -491,3 +498,54 @@ void Ref_Resign(gentity_t * ent)
|
|||
trap_Cvar_Set("g_RQ3_RefID", "-1");
|
||||
trap_SendServerCommand(ent - g_entities, "print \"You resign from your referee status\n\"");
|
||||
}
|
||||
|
||||
/*
|
||||
Timelimit
|
||||
RoundLimit
|
||||
RoundTimeLimit
|
||||
Fraglimit
|
||||
Max Players <- TO BE IMPLEMENTED
|
||||
Friendly Fire
|
||||
Chase Cam
|
||||
Team Grenades
|
||||
---> Irvision Doesnt Exist.
|
||||
Force Team Talk
|
||||
*/
|
||||
#define NR_SETTVARS 9
|
||||
|
||||
const char *settings[] = {"timelimit","g_RQ3_roundlimit","g_RQ3_roundtimelimit","fraglimit","g_RQ3_maxplayers","g_RQ3_forceteamtalk",
|
||||
"g_RQ3_limchasecam","g_RQ3_tgren","g_friendlyFire"};
|
||||
|
||||
void MM_Settings_f(gentity_t * ent) {
|
||||
int i;
|
||||
char str[MAX_TOKEN_CHARS];
|
||||
|
||||
if (!g_RQ3_matchmode.integer)
|
||||
return;
|
||||
|
||||
//Invalid Data SENT
|
||||
if(trap_Argc()!= NR_SETTVARS)
|
||||
return;
|
||||
if(ent->client->sess.captain == TEAM_FREE && ent - g_entities != g_RQ3_RefID.integer) {
|
||||
trap_SendServerCommand(ent - g_entities, "print \"Only Captains and Referees can change match Settings\n\"");
|
||||
return;
|
||||
}
|
||||
//Game has begun
|
||||
if(level.inGame) {
|
||||
trap_SendServerCommand(ent - g_entities, "print \"Settings can only be changed before a game starts\n\"");
|
||||
return;
|
||||
}
|
||||
//Referee locked settings
|
||||
if(level.settingsLocked) {
|
||||
trap_SendServerCommand(ent - g_entities, "print \"Settings are currently locked, only Referee can unlock them\n\"");
|
||||
return;
|
||||
}
|
||||
|
||||
for(i = 0; i < NR_SETTVARS; ++i) {
|
||||
trap_Argv(i+1, str, sizeof(str));
|
||||
trap_Cvar_Set(settings[i],str);
|
||||
}
|
||||
|
||||
trap_SendServerCommand(-1,va("print \"Match Settings have been changed by %s\n\"",ent->client->pers.netname));
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue