From ce7a3beab04b9b4455a0e3364e90cf0466a12f8a Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Wed, 19 Nov 2008 01:17:48 -0600 Subject: [PATCH] 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! --- core/metamod.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/metamod.cpp b/core/metamod.cpp index c52a639..1ebaab4 100644 --- a/core/metamod.cpp +++ b/core/metamod.cpp @@ -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);