1
0
Fork 0
forked from fte/fteqw

New cvar: allow_download_pakcontents

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@924 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-03-24 18:32:44 +00:00
parent ad0ee0edfc
commit 0b3fc5c57f
2 changed files with 4 additions and 2 deletions

View file

@ -73,6 +73,7 @@ cvar_t allow_download_sounds = {"allow_download_sounds", "1"};
cvar_t allow_download_demos = {"allow_download_demos", "1"};
cvar_t allow_download_maps = {"allow_download_maps", "1"};
cvar_t allow_download_anymap = {"allow_download_pakmaps", "0"};
cvar_t allow_download_pakcontents = {"allow_download_pakcontents", "1"};
cvar_t allow_download_root = {"allow_download_root", "0"};
cvar_t allow_download_textures = {"allow_download_textures", "1"};
cvar_t allow_download_pk3s = {"allow_download_pk3s", "1"};
@ -3002,6 +3003,7 @@ void SV_InitLocal (void)
Cvar_Register (&allow_download_maps, cvargroup_serverpermissions);
Cvar_Register (&allow_download_demos, cvargroup_serverpermissions);
Cvar_Register (&allow_download_anymap, cvargroup_serverpermissions);
Cvar_Register (&allow_download_pakcontents, cvargroup_serverpermissions);
Cvar_Register (&allow_download_textures,cvargroup_serverpermissions);
Cvar_Register (&allow_download_pk3s, cvargroup_serverpermissions);
Cvar_Register (&allow_download_wads, cvargroup_serverpermissions);

View file

@ -1588,7 +1588,7 @@ SV_BeginDownload_f
void SV_BeginDownload_f(void)
{
char *name;
extern cvar_t allow_download_anymap;
extern cvar_t allow_download_anymap, allow_download_pakcontents;
extern int file_from_pak; // ZOID did file come from pak?
@ -1638,7 +1638,7 @@ void SV_BeginDownload_f(void)
if (!host_client->download
// special check for maps, if it came from a pak file, don't allow
// download ZOID
|| (!allow_download_anymap.value && strncmp(name, "maps/", 5) == 0 && file_from_pak))
|| ((!allow_download_pakcontents.value || (!allow_download_anymap.value && strncmp(name, "maps/", 5) == 0)) && file_from_pak))
{
if (host_client->download)
{