This program 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.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
*/
// common.c -- misc functions used in client and server
+#include <stdlib.h>
#include <fcntl.h>
#ifdef WIN32
#include <io.h>
#else
#include <unistd.h>
#endif
-#include <stdlib.h>
#include "quakedef.h"
static char *safeargvs[NUM_SAFE_ARGVS] =
{"-stdvid", "-nolan", "-nosound", "-nocdaudio", "-nojoy", "-nomouse", "-dibonly"};
-cvar_t registered = {"registered","0"};
-cvar_t cmdline = {"cmdline","0", false, true};
+cvar_t registered = {0, "registered","0"};
+cvar_t cmdline = {0, "cmdline","0"};
qboolean com_modified; // set true if using non-id files
-qboolean proghack;
+//qboolean proghack;
-int static_registered = 1; // only for startup check, then set
+//int static_registered = 1; // only for startup check, then set
qboolean msg_suppress_1 = 0;
int com_argc;
char **com_argv;
-#define CMDLINE_LENGTH 256
+// LordHavoc: made commandline 1024 characters instead of 256
+#define CMDLINE_LENGTH 1024
char com_cmdline[CMDLINE_LENGTH];
qboolean standard_quake = true, rogue = false, hipnotic = false, nehahra = false;
int val;
int sign;
int c;
-
+
if (*str == '-')
{
sign = -1;
{
Cvar_Set ("cmdline", com_cmdline);
- static_registered = 0;
+// static_registered = 0;
if (!Sys_FileTime("gfx/pop.lmp"))
{
// Cvar_Set ("cmdline", com_cmdline);
Cvar_Set ("registered", "1");
- static_registered = 1;
+// static_registered = 1;
Con_Printf ("Playing registered version.\n");
}
}
+extern void Mathlib_Init(void);
+
/*
================
COM_Init
Cmd_AddCommand ("path", COM_Path_f);
Cmd_AddCommand ("memstats", COM_Memstats_f);
+ Mathlib_Init();
+
COM_InitFilesystem ();
COM_CheckRegistered ();
}
// search through the path, one element at a time
//
search = com_searchpaths;
- if (proghack)
- { // gross hack to use quake 1 progs with quake 2 maps
- if (!strcmp(filename, "progs.dat"))
- search = search->next;
- }
+// if (proghack)
+// { // gross hack to use quake 1 progs with quake 2 maps
+// if (!strcmp(filename, "progs.dat"))
+// search = search->next;
+// }
for ( ; search ; search = search->next)
{
}
}
- if (COM_CheckParm ("-proghack"))
- proghack = true;
+// if (COM_CheckParm ("-proghack"))
+// proghack = true;
}
int COM_FileExists(char *filename)