--- common.c.orig 2008-01-10 22:02:49.000000000 +0900 +++ common.c 2008-01-10 22:02:34.000000000 +0900 @@ -29,7 +29,7 @@ static char *safeargvs[NUM_SAFE_ARGVS] = {"-stdvid", "-nolan", "-nosound", "-nocdaudio", "-nojoy", "-nomouse", "-dibonly"}; -cvar_t registered = {"registered","0"}; +cvar_t registered = {"registered","1"}; cvar_t cmdline = {"cmdline","0", false, true}; qboolean com_modified; // set true if using non-id files @@ -55,27 +55,6 @@ qboolean standard_quake = true, rogue, hipnotic; -// this graphic needs to be in the pak file to use registered features -unsigned short pop[] = -{ - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -,0x0000,0x0000,0x6600,0x0000,0x0000,0x0000,0x6600,0x0000 -,0x0000,0x0066,0x0000,0x0000,0x0000,0x0000,0x0067,0x0000 -,0x0000,0x6665,0x0000,0x0000,0x0000,0x0000,0x0065,0x6600 -,0x0063,0x6561,0x0000,0x0000,0x0000,0x0000,0x0061,0x6563 -,0x0064,0x6561,0x0000,0x0000,0x0000,0x0000,0x0061,0x6564 -,0x0064,0x6564,0x0000,0x6469,0x6969,0x6400,0x0064,0x6564 -,0x0063,0x6568,0x6200,0x0064,0x6864,0x0000,0x6268,0x6563 -,0x0000,0x6567,0x6963,0x0064,0x6764,0x0063,0x6967,0x6500 -,0x0000,0x6266,0x6769,0x6a68,0x6768,0x6a69,0x6766,0x6200 -,0x0000,0x0062,0x6566,0x6666,0x6666,0x6666,0x6562,0x0000 -,0x0000,0x0000,0x0062,0x6364,0x6664,0x6362,0x0000,0x0000 -,0x0000,0x0000,0x0000,0x0062,0x6662,0x0000,0x0000,0x0000 -,0x0000,0x0000,0x0000,0x0061,0x6661,0x0000,0x0000,0x0000 -,0x0000,0x0000,0x0000,0x0000,0x6500,0x0000,0x0000,0x0000 -,0x0000,0x0000,0x0000,0x0000,0x6400,0x0000,0x0000,0x0000 -}; - /* @@ -1017,32 +996,7 @@ ================ */ 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;