Skip to content

Commit

Permalink
Don't add pk3dirs if connecting to a pure server
Browse files Browse the repository at this point in the history
Only .cfg etc would be read from pk3dirs, but they should be treated like pk3s that are not on the pure list.
  • Loading branch information
zturtleman committed Feb 12, 2013
1 parent ebee211 commit 6f88df2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions code/qcommon/files.c
Expand Up @@ -2860,11 +2860,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;
Expand Down

0 comments on commit 6f88df2

Please sign in to comment.