core/metamod.cpp
changeset 578 acd1baa3a24a
parent 577 80120bac7719
child 589 8e97a1e960a5
     1.1 --- a/core/metamod.cpp	Wed Nov 19 01:14:16 2008 -0600
     1.2 +++ b/core/metamod.cpp	Wed Nov 19 01:17:48 2008 -0600
     1.3 @@ -1436,6 +1436,7 @@
     1.4  LookForVDFs(const char *dir)
     1.5  {
     1.6  	char path[MAX_PATH];
     1.7 +	char relpath[MAX_PATH * 2];
     1.8  
     1.9  #if defined _MSC_VER
    1.10  	HANDLE hFind;
    1.11 @@ -1463,7 +1464,8 @@
    1.12  	do
    1.13  	{
    1.14  		g_Metamod.PathFormat(path, sizeof(path), "%s\\%s", dir, fd.cFileName);
    1.15 -		ProcessVDF(path);
    1.16 +		UTIL_Relatize(relpath, sizeof(relpath), mod_path.c_str(), path);
    1.17 +		ProcessVDF(relpath);
    1.18  	} while (FindNextFile(hFind, &fd));
    1.19  
    1.20  	FindClose(hFind);
    1.21 @@ -1491,7 +1493,8 @@
    1.22  			continue;
    1.23  		}
    1.24  		g_Metamod.PathFormat(path, sizeof(path), "%s/%s", dir, pEnt->d_name);
    1.25 -		ProcessVDF(path);
    1.26 +		UTIL_Relatize(relpath, sizeof(relpath), mod_path.c_str(), path);
    1.27 +		ProcessVDF(relpath);
    1.28  	}
    1.29  
    1.30  	closedir(pDir);