1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-18 11:54:14 +01:00

LookForVDFs() in core now 'relatizes' paths to VDFs that it finds.

This eliminates the annoying warning in L4D:
***VPK: FindFile Attempting to use full path with VPK file!
This commit is contained in:
Scott Ehlert 2008-11-19 01:17:48 -06:00
parent d19cedd4eb
commit ce7a3beab0

View File

@ -1436,6 +1436,7 @@ static void
LookForVDFs(const char *dir)
{
char path[MAX_PATH];
char relpath[MAX_PATH * 2];
#if defined _MSC_VER
HANDLE hFind;
@ -1463,7 +1464,8 @@ LookForVDFs(const char *dir)
do
{
g_Metamod.PathFormat(path, sizeof(path), "%s\\%s", dir, fd.cFileName);
ProcessVDF(path);
UTIL_Relatize(relpath, sizeof(relpath), mod_path.c_str(), path);
ProcessVDF(relpath);
} while (FindNextFile(hFind, &fd));
FindClose(hFind);
@ -1491,7 +1493,8 @@ LookForVDFs(const char *dir)
continue;
}
g_Metamod.PathFormat(path, sizeof(path), "%s/%s", dir, pEnt->d_name);
ProcessVDF(path);
UTIL_Relatize(relpath, sizeof(relpath), mod_path.c_str(), path);
ProcessVDF(relpath);
}
closedir(pDir);