Cvar_RegisterVariable (&sv_writepicture_quality);
SV_InitOperatorCommands();
+ host.hook.SV_Shutdown = SV_Shutdown;
sv_mempool = Mem_AllocPool("server", 0, NULL);
if (!sv_allowdownloads_archive.integer)
{
- if (!strcasecmp(extension, "pak") || !strcasecmp(extension, "pk3"))
+ if (!strcasecmp(extension, "pak") || !strcasecmp(extension, "pk3") || !strcasecmp(extension, "dpk"))
{
SV_ClientPrintf("Download rejected: file \"%s\" is an archive\nYou must separately download or purchase the data archives for this game/mod to get this file\n", host_client->download_name);
SV_ClientCommands("\nstopdownload\n");
prvm_prog_t *prog = SVVM_prog;
int i;
- Con_DPrintf("SV_Shutdown\n");
+ SV_LockThreadMutex();
if (!sv.active)
- return;
+ goto end;
+
+ Con_DPrintf("SV_Shutdown\n");
NetConn_Heartbeat(2);
NetConn_Heartbeat(2);
//
memset(&sv, 0, sizeof(sv));
memset(svs.clients, 0, svs.maxclients*sizeof(client_t));
-
- cl.islocalgame = false;
+end:
+ SV_UnlockThreadMutex();
}
/////////////////////////////////////////////////////