diff options
author | Zack Middleton <zturtleman@gmail.com> | 2013-02-11 19:15:14 -0600 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-02-16 21:54:33 +0000 |
commit | c14d452b05fdc5c069e6f469bbbeb7876cdfb0ff (patch) | |
tree | 065956a50e299cbf4463a500f684c1d2c444d718 /src/qcommon | |
parent | e91c631681fa10e62de829cad513dd06b5063663 (diff) |
Don't add pk3dirs if connecting to a pure server
Only .cfg etc would be read from pk3dirs, but they should be treated like pk3s that are not on the pure list.
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/files.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/qcommon/files.c b/src/qcommon/files.c index ddb43048..6f790da3 100644 --- a/src/qcommon/files.c +++ b/src/qcommon/files.c @@ -2822,11 +2822,17 @@ void FS_AddGameDirectory( const char *path, const char *dir ) { // Get .pk3 files pakfiles = Sys_ListFiles(curpath, ".pk3", NULL, &numfiles, qfalse); - // Get top level directories (we'll filter them later since the Sys_ListFiles filtering is terrible) - pakdirs = Sys_ListFiles(curpath, "/", NULL, &numdirs, qfalse); - qsort( pakfiles, numfiles, sizeof(char*), paksort ); - qsort( pakdirs, numdirs, sizeof(char *), paksort ); + + if ( fs_numServerPaks ) { + numdirs = 0; + pakdirs = NULL; + } else { + // Get top level directories (we'll filter them later since the Sys_ListFiles filtering is terrible) + pakdirs = Sys_ListFiles(curpath, "/", NULL, &numdirs, qfalse); + + qsort( pakdirs, numdirs, sizeof(char *), paksort ); + } pakfilesi = 0; pakdirsi = 0; |