Trying to get some sv_pure stuff working, preliminary stuff.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1764 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-01-02 22:34:25 +00:00
parent 39ad9338b9
commit 9220034213

View file

@ -1824,6 +1824,8 @@ void SV_InitBotLib()
qboolean SVQ3_InitGame(void) qboolean SVQ3_InitGame(void)
{ {
char buffer[8192]; char buffer[8192];
char *str;
char sysinfo[8192];
extern cvar_t progs; extern cvar_t progs;
if (sv.worldmodel->fromgame == fg_quake) if (sv.worldmodel->fromgame == fg_quake)
@ -1855,8 +1857,21 @@ qboolean SVQ3_InitGame(void)
Cvar_Set(Cvar_Get("sv_running", "0", 0, "Q3 compatability"), "1"); Cvar_Set(Cvar_Get("sv_running", "0", 0, "Q3 compatability"), "1");
svq3_configstrings[1] = Z_Malloc(32); sysinfo[0] = '\0';
Info_SetValueForKey(svq3_configstrings[1], "sv_serverid", va("%i", svs.spawncount), MAX_SERVERINFO_STRING); Info_SetValueForKey(sysinfo, "sv_serverid", va("%i", svs.spawncount), MAX_SERVERINFO_STRING);
str = FS_GetPackHashes(buffer, sizeof(buffer), false);
Info_SetValueForKey(sysinfo, "sv_paks", str, MAX_SERVERINFO_STRING);
str = FS_GetPackNames(buffer, sizeof(buffer), false);
Info_SetValueForKey(sysinfo, "sv_pakNames", str, MAX_SERVERINFO_STRING);
str = FS_GetPackHashes(buffer, sizeof(buffer), true);
Info_SetValueForKey(sysinfo, "sv_referencedPaks", str, MAX_SERVERINFO_STRING);
str = FS_GetPackNames(buffer, sizeof(buffer), true);
Info_SetValueForKey(sysinfo, "sv_referencedPakNames", str, MAX_SERVERINFO_STRING);
Info_SetValueForKey(sysinfo, "sv_pure", "1", MAX_SERVERINFO_STRING);
SVQ3_SetConfigString(1, sysinfo);
mapentspointer = sv.worldmodel->entities; mapentspointer = sv.worldmodel->entities;
VM_Call(q3gamevm, GAME_INIT, 0, rand(), false); VM_Call(q3gamevm, GAME_INIT, 0, rand(), false);
@ -2791,7 +2806,8 @@ void SVQ3_ParseClientMessage(client_t *client)
if(msg_readcount > net_message.cursize) if(msg_readcount > net_message.cursize)
{ {
Con_Printf("corrupted packet from %s\n", client->name); Con_Printf("corrupted packet from %s\n", client->name);
SV_DropClient(client); client->drop = true;
// SV_DropClient(client);
return; return;
} }
@ -2805,7 +2821,8 @@ void SVQ3_ParseClientMessage(client_t *client)
{ {
default: default:
Con_Printf("corrupted packet from %s\n", client->name); Con_Printf("corrupted packet from %s\n", client->name);
SV_DropClient(client); client->drop = true;
// SV_DropClient(client);
return; return;
case clcq3_nop: case clcq3_nop:
break; break;