Merge pull request #1 from Naievil/removed_registration

Remove registered version check
This commit is contained in:
Ryan Baldwin 2022-06-19 13:30:06 -07:00 committed by GitHub
commit b15cebeade
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 58 deletions

View File

@ -29,15 +29,12 @@ static char *argvdummy = " ";
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};
qboolean com_modified; // set true if using non-id files
qboolean proghack;
int static_registered = 1; // only for startup check, then set
qboolean msg_suppress_1 = 0;
void COM_InitFilesystem (void);
@ -1002,50 +999,6 @@ int COM_CheckParm (char *parm)
return 0;
}
/*
================
COM_CheckRegistered
Looks for the pop.txt file and verifies it.
Sets the "registered" cvar.
Immediately exits out if an alternate game was attempted to be started without
being registered.
================
*/
void COM_CheckRegistered (void)
{
int h;
unsigned short check[128];
int i;
COM_OpenFile("gfx/pop.lmp", &h);
static_registered = 0;
if (h == -1)
{
#if WINDED
Sys_Error ("This dedicated server requires a full registered copy of Quake");
#endif
Con_Printf ("Playing shareware version.\n");
if (com_modified)
Sys_Error ("You must have the registered version to use modified games");
return;
}
Sys_FileRead (h, check, sizeof(check));
COM_CloseFile (h);
for (i=0 ; i<128 ; i++)
if (pop[i] != (unsigned short)BigShort (check[i]))
Sys_Error ("Corrupted data file.");
Cvar_Set ("cmdline", com_cmdline);
Cvar_Set ("registered", "1");
static_registered = 1;
Con_Printf ("Playing registered version.\n");
}
void COM_Path_f (void);
@ -1148,12 +1101,10 @@ void COM_Init (char *basedir)
LittleFloat = FloatSwap;
}
Cvar_RegisterVariable (&registered);
Cvar_RegisterVariable (&cmdline);
Cmd_AddCommand ("path", COM_Path_f);
COM_InitFilesystem ();
COM_CheckRegistered ();
}
@ -1414,13 +1365,7 @@ int COM_FindFile (char *filename, int *handle, FILE **file)
}
else
{
// check a file in the directory tree
if (!static_registered)
{ // if not a registered version, don't ever go beyond base
if ( strchr (filename, '/') || strchr (filename,'\\'))
continue;
}
// check a file in the directory tree
sprintf (netpath, "%s/%s",search->filename, filename);
findtime = Sys_FileTime (netpath);

View File

@ -2738,8 +2738,6 @@ void M_NetStart_Change (int dir)
//PGM 03/02/97 added 1 for dmatch episode
else if (rogue)
count = 4;
else if (registered.value)
count = 7;
else
count = 2;