remove the rest of the antipiracy

master
an 2019-11-28 21:19:42 -05:00
parent 7396d8e285
commit 1e5b30ba49
1 changed files with 1 additions and 25 deletions

View File

@ -34,19 +34,8 @@ int32_t safemode;
cvar_t registered = {"registered", "1", CVAR_ROM};
cvar_t cmdline = {"cmdline", "", CVAR_ROM/*|CVAR_SERVERINFO*/}; /* sending cmdline upon CCREQ_RULE_INFO is evil */
static bool com_modified; // set true if using non-id files
static void COM_Path_f(void);
// if a packfile directory differs from this, it is assumed to be hacked
#define PAK0_COUNT 339 /* id1/pak0.pak - v1.0x */
#define PAK0_CRC_V100 13900 /* id1/pak0.pak - v1.00 */
#define PAK0_CRC_V101 62751 /* id1/pak0.pak - v1.01 */
#define PAK0_CRC_V106 32981 /* id1/pak0.pak - v1.06 */
#define PAK0_CRC (PAK0_CRC_V106)
#define PAK0_COUNT_V091 308 /* id1/pak0.pak - v0.91/0.92, not supported */
#define PAK0_CRC_V091 28804 /* id1/pak0.pak - v0.91/0.92, not supported */
char com_token[1024];
int32_t com_argc;
char **com_argv;
@ -1854,7 +1843,6 @@ static pack_t *COM_LoadPackFile(const char *packfile)
pack_t *pack;
int32_t packhandle;
dpackfile_t info[MAX_FILES_IN_PACK];
uint16_t crc;
if(Sys_FileOpenRead(packfile, &packhandle) == -1)
return NULL;
@ -1882,21 +1870,11 @@ static pack_t *COM_LoadPackFile(const char *packfile)
if(numpackfiles > MAX_FILES_IN_PACK)
Sys_Error("%s has %" PRIi32 " files", packfile, numpackfiles);
if(numpackfiles != PAK0_COUNT)
com_modified = true; // not the original file
newfiles = (packfile_t *) Z_Malloc(numpackfiles * sizeof(packfile_t));
Sys_FileSeek(packhandle, header.dirofs);
Sys_FileRead(packhandle, (void *)info, header.dirlen);
// crc the directory to check for modifications
CRC_Init(&crc);
for(i = 0; i < header.dirlen; i++)
CRC_ProcessByte(&crc, ((byte *)info)[i]);
if(crc != PAK0_CRC_V106 && crc != PAK0_CRC_V101 && crc != PAK0_CRC_V100)
com_modified = true;
// parse the directory
for(i = 0; i < numpackfiles; i++)
{
@ -2025,8 +2003,6 @@ _same:
}
}
com_modified = true;
//Kill the server
CL_Disconnect();
Host_ShutdownServer(true);
@ -2120,6 +2096,7 @@ void COM_InitFilesystem(void) //johnfitz -- modified based on topaz's tutorial
int32_t i, j;
Cvar_RegisterVariable(&cmdline);
Cvar_RegisterVariable(&registered);
Cmd_AddCommand("path", COM_Path_f);
Cmd_AddCommand("game", COM_Game_f); //johnfitz
@ -2158,7 +2135,6 @@ void COM_InitFilesystem(void) //johnfitz -- modified based on topaz's tutorial
const char *p = com_argv[i + 1];
if(!*p || !strcmp(p, ".") || strstr(p, "..") || strstr(p, "/") || strstr(p, "\\") || strstr(p, ":"))
Sys_Error("gamedir should be a single directory name, not a path\n");
com_modified = true;
// don't load mission packs twice
if(COM_CheckParm("-rogue") && !q_strcasecmp(p, "rogue")) p = NULL;
if(COM_CheckParm("-hipnotic") && !q_strcasecmp(p, "hipnotic")) p = NULL;