summaryrefslogtreecommitdiff
path: root/src/qcommon/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcommon/common.c')
-rw-r--r--src/qcommon/common.c96
1 files changed, 15 insertions, 81 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c
index b9de0679..0d82ac81 100644
--- a/src/qcommon/common.c
+++ b/src/qcommon/common.c
@@ -1,21 +1,22 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2006 Tim Angus
-This file is part of Quake III Arena source code.
+This file is part of Tremulous.
-Quake III Arena source code is free software; you can redistribute it
+Tremulous is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
-Quake III Arena source code is distributed in the hope that it will be
+Tremulous is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with Quake III Arena source code; if not, write to the Free Software
+along with Tremulous; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
@@ -37,14 +38,9 @@ int demo_protocols[] =
#define MAX_NUM_ARGVS 50
#define MIN_DEDICATED_COMHUNKMEGS 1
-#define MIN_COMHUNKMEGS 56
-#ifdef MACOS_X
-#define DEF_COMHUNKMEGS "64"
+#define MIN_COMHUNKMEGS 128
+#define DEF_COMHUNKMEGS "128"
#define DEF_COMZONEMEGS "24"
-#else
-#define DEF_COMHUNKMEGS "56"
-#define DEF_COMZONEMEGS "16"
-#endif
int com_argc;
char *com_argv[MAX_NUM_ARGVS+1];
@@ -342,9 +338,9 @@ command lines.
All of these are valid:
-quake3 +set test blah +map test
-quake3 set test blah+map test
-quake3 set test blah + map test
+tremulous +set test blah +map test
+tremulous set test blah+map test
+tremulous set test blah + map test
============================================================================
*/
@@ -389,7 +385,7 @@ void Com_ParseCommandLine( char *commandLine ) {
Com_SafeMode
Check for "safe" on the command line, which will
-skip loading of q3config.cfg
+skip loading of autogen.cfg
===================
*/
qboolean Com_SafeMode( void ) {
@@ -2304,55 +2300,6 @@ void Com_AppendCDKey( const char *filename ) {
}
}
-#ifndef DEDICATED // bk001204
-/*
-=================
-Com_WriteCDKey
-=================
-*/
-static void Com_WriteCDKey( const char *filename, const char *ikey ) {
- fileHandle_t f;
- char fbuffer[MAX_OSPATH];
- char key[17];
-#ifndef _WIN32
- mode_t savedumask;
-#endif
-
-
- sprintf(fbuffer, "%s/q3key", filename);
-
-
- Q_strncpyz( key, ikey, 17 );
-
- if(!CL_CDKeyValidate(key, NULL) ) {
- return;
- }
-
-#ifndef _WIN32
- savedumask = umask(0077);
-#endif
- f = FS_SV_FOpenFileWrite( fbuffer );
- if ( !f ) {
- Com_Printf ("Couldn't write CD key to %s.\n", fbuffer );
- goto out;
- }
-
- FS_Write( key, 16, f );
-
- FS_Printf( f, "\n// generated by quake, do not modify\r\n" );
- FS_Printf( f, "// Do not give this file to ANYONE.\r\n" );
- FS_Printf( f, "// id Software and Activision will NOT ask you to send this file to them.\r\n");
-
- FS_FCloseFile( f );
-out:
-#ifndef _WIN32
- umask(savedumask);
-#endif
- return;
-}
-#endif
-
-
static void Com_DetectAltivec(void)
{
// Only detect if user hasn't forcibly disabled it.
@@ -2416,9 +2363,9 @@ void Com_Init( char *commandLine ) {
Cbuf_AddText ("exec default.cfg\n");
- // skip the q3config.cfg if "safe" is on the command line
+ // skip the autogen.cfg if "safe" is on the command line
if ( !Com_SafeMode() ) {
- Cbuf_AddText ("exec q3config.cfg\n");
+ Cbuf_AddText ("exec autogen.cfg\n");
}
Cbuf_AddText ("exec autoexec.cfg\n");
@@ -2548,7 +2495,7 @@ void Com_WriteConfigToFile( const char *filename ) {
return;
}
- FS_Printf (f, "// generated by quake, do not modify\n");
+ FS_Printf (f, "// generated by tremulous, do not modify\n");
Key_WriteBindings (f);
Cvar_WriteVariables (f);
FS_FCloseFile( f );
@@ -2563,9 +2510,6 @@ Writes key bindings and archived cvars to config file if modified
===============
*/
void Com_WriteConfiguration( void ) {
-#ifndef DEDICATED // bk001204
- cvar_t *fs;
-#endif
// if we are quiting without fully initializing, make sure
// we don't write out anything
if ( !com_fullyInitialized ) {
@@ -2577,17 +2521,7 @@ void Com_WriteConfiguration( void ) {
}
cvar_modifiedFlags &= ~CVAR_ARCHIVE;
- Com_WriteConfigToFile( "q3config.cfg" );
-
- // bk001119 - tentative "not needed for dedicated"
-#ifndef DEDICATED
- fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO );
- if (UI_usesUniqueCDKey() && fs && fs->string[0] != 0) {
- Com_WriteCDKey( fs->string, &cl_cdkey[16] );
- } else {
- Com_WriteCDKey( "baseq3", cl_cdkey );
- }
-#endif
+ Com_WriteConfigToFile( "autogen.cfg" );
}