Revert "Also load files from main directory"

This reverts commit ac566d73aaafd18c686579f7eba34430e54b44c7.
This commit is contained in:
Amos 2022-01-28 01:32:55 +01:00
parent 65299affa1
commit 7704559869

View File

@ -61,19 +61,11 @@ FileHandle_t HCBaseFileSystem_ReadFromVPK(void* pVpk, std::int64_t* pResults, ch
{ {
// Erase '//*/'. // Erase '//*/'.
svFilePath.erase(0, 4); svFilePath.erase(0, 4);
// Check if file exist in the main game folder.
if (FileExists(svFilePath.c_str()))
{
*pResults = -1;
return (void*)pResults;
}
} }
// TODO: obtain 'mod' SearchPath's instead. // TODO: obtain 'mod' SearchPath's instead.
svFilePath.insert(0, "platform\\"); svFilePath.insert(0, "platform\\");
// Check if file exist in 'mod' folders.
if (FileExists(svFilePath.c_str()) /*|| FileExists(pszFilePath)*/) if (FileExists(svFilePath.c_str()) /*|| FileExists(pszFilePath)*/)
{ {
*pResults = -1; *pResults = -1;
@ -93,19 +85,12 @@ bool HCBaseFileSystem_ReadFromCache(void* pFileSystem, char* pszFilePath, void*
{ {
// Erase '//*/'. // Erase '//*/'.
svFilePath.erase(0, 4); svFilePath.erase(0, 4);
// Check if file exist in the main game folder.
if (FileExists(svFilePath.c_str()))
{
return false;
}
} }
// TODO: obtain 'mod' SearchPath's instead. // TODO: obtain 'mod' SearchPath's instead.
svFilePath.insert(0, "platform\\"); svFilePath.insert(0, "platform\\");
// Check if file exist in 'mod' folders. if (FileExists(svFilePath.c_str()) /*|| FileExists(pszFilePath)*/)
if (FileExists(svFilePath.c_str()))
{ {
return false; return false;
} }