From: Rudolf Polzer Date: Thu, 24 Jun 2010 10:27:26 +0000 (+0200) Subject: allow 64 directories, no longer 8 X-Git-Tag: xonotic-v0.5.0~256 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0138fccfb89921c01cd50c5a25e15384b7b70e89;p=xonotic%2Fnetradiant.git allow 64 directories, no longer 8 --- diff --git a/plugins/vfspk3/vfs.cpp b/plugins/vfspk3/vfs.cpp index 8b52b535..b73f44e9 100644 --- a/plugins/vfspk3/vfs.cpp +++ b/plugins/vfspk3/vfs.cpp @@ -62,7 +62,7 @@ ArchiveModules& FileSystemQ3API_getArchiveModules(); #include "moduleobservers.h" -#define VFS_MAXDIRS 8 +#define VFS_MAXDIRS 64 #if defined(WIN32) #define PATH_MAX 260 @@ -297,7 +297,7 @@ typedef std::set Archives; // reads all pak files from a dir void InitDirectory(const char* directory, ArchiveModules& archiveModules) { - if (g_numDirs == (VFS_MAXDIRS-1)) + if (g_numDirs == VFS_MAXDIRS) return; strncpy(g_strDirs[g_numDirs], directory, PATH_MAX); @@ -356,7 +356,7 @@ void InitDirectory(const char* directory, ArchiveModules& archiveModules) if(ext && !string_compare_nocase_upper(ext, ".pk3dir")) { - if (g_numDirs == (VFS_MAXDIRS-1)) + if (g_numDirs == VFS_MAXDIRS) continue; snprintf(g_strDirs[g_numDirs], PATH_MAX, "%s%s/", path, name); g_strDirs[g_numDirs][PATH_MAX] = '\0'; diff --git a/tools/quake3/common/vfs.c b/tools/quake3/common/vfs.c index f706aee5..f4dbb543 100644 --- a/tools/quake3/common/vfs.c +++ b/tools/quake3/common/vfs.c @@ -169,7 +169,7 @@ void vfsInitDirectory (const char *path) char *dirlist; GDir *dir; - if (g_numDirs == (VFS_MAXDIRS-1)) + if (g_numDirs == VFS_MAXDIRS) return; Sys_Printf ("VFS Init: %s\n", path); @@ -198,7 +198,7 @@ void vfsInitDirectory (const char *path) if(ext && !Q_stricmp(ext, ".pk3dir")) { - if (g_numDirs == (VFS_MAXDIRS-1)) + if (g_numDirs == VFS_MAXDIRS) continue; snprintf(g_strDirs[g_numDirs], PATH_MAX, "%s/%s", path, name); g_strDirs[g_numDirs][PATH_MAX] = '\0';