g_rq3_cvarfile allows you to change which file holds the restricted cvars

This commit is contained in:
Scott Brooks 2002-06-11 01:43:08 +00:00
parent 033dfdc504
commit 0c3a3fdb76
3 changed files with 18 additions and 5 deletions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.87 2002/06/11 01:43:08 blaze
// g_rq3_cvarfile allows you to change which file holds the restricted cvars
//
// Revision 1.86 2002/06/07 19:07:08 slicer
// removed cvars for teamXready, replaced by level.teamXready
//
@ -1193,20 +1196,20 @@ int G_SendCheatVars(int clientNum)
char *token;
char text[20000];
fileHandle_t f;
char *filename = "cvar.cfg";
char cheatVar[40], cl_cheatvar[128];
float lowval, highval;
//NiceAss: Added so /devmap will not have the client check cvars. Lie to the server that it loaded fine =)
if (g_cheats.integer) return qtrue;
// load the file
len = trap_FS_FOpenFile( filename, &f, FS_READ );
len = trap_FS_FOpenFile( g_RQ3_cvarfile.string, &f, FS_READ );
if ( len <= 0 ) {
return qfalse;
}
if ( len >= sizeof( text ) - 1 ) {
G_Printf( "File %s too long\n", filename );
G_Printf( "File %s too long\n", g_RQ3_cvarfile.string);
return qfalse;
}

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.91 2002/06/11 01:43:08 blaze
// g_rq3_cvarfile allows you to change which file holds the restricted cvars
//
// Revision 1.90 2002/06/09 23:18:49 assimon
// Add coments to the init parser. Added Message before intermition telling next map. New cvar: g_RQ3_NextMap
//
@ -1198,6 +1201,7 @@ extern vmCvar_t g_RQ3_maxWeapons;
extern vmCvar_t g_RQ3_statLog;
extern vmCvar_t g_RQ3_ejectBlood;
extern vmCvar_t g_RQ3_respawnProtectTime;
extern vmCvar_t g_RQ3_cvarfile;
//Elder: spam protection cvars
extern vmCvar_t g_RQ3_messageMaxCount; // Max messages in interval
extern vmCvar_t g_RQ3_messageInterval; // Time interval for spam check

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.72 2002/06/11 01:43:08 blaze
// g_rq3_cvarfile allows you to change which file holds the restricted cvars
//
// Revision 1.71 2002/06/10 23:53:32 assimon
// Fixed buffer overflow. (commented the printing of the ini file contents)
//
@ -320,7 +323,8 @@ vmCvar_t g_proxMineTimeout;
vmCvar_t g_enableBreath;
// JBravo: ditto
vmCvar_t g_enableDust;
//Blaze let cvar.cfg be set by server admins
vmCvar_t g_RQ3_cvarfile;
// bk001129 - made static to avoid aliasing
static cvarTable_t gameCvarTable[] = {
@ -448,6 +452,8 @@ static cvarTable_t gameCvarTable[] = {
{ &g_RQ3_maxteamkills, "g_RQ3_maxteamkills", "0", CVAR_ARCHIVE, 0, qtrue},
{ &g_RQ3_twbanrounds, "g_RQ3_twbanrounds", "2", CVAR_ARCHIVE, 0, qtrue},
{ &g_RQ3_tkbanrounds, "g_RQ3_tkbanrounds", "2", CVAR_ARCHIVE, 0, qtrue},
//Blaze: let cvar.cfg be set by the server admins
{ &g_RQ3_cvarfile, "g_RQ3_cvarfile", "cvar.cfg", CVAR_ARCHIVE, 0, qtrue},
//Slicer: Team Status Cvars for MM
//{ &g_RQ3_team1ready, "g_RQ3_team1ready", "0", 0, 0, qfalse},
//{ &g_RQ3_team2ready, "g_RQ3_team2ready", "0", 0, 0, qfalse},