mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-09-17 07:19:02 +02:00
Also load files from main directory
Still compatible with previous commit
This commit is contained in:
@@ -61,11 +61,19 @@ 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;
|
||||||
@@ -85,12 +93,19 @@ 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\\");
|
||||||
|
|
||||||
if (FileExists(svFilePath.c_str()) /*|| FileExists(pszFilePath)*/)
|
// Check if file exist in 'mod' folders.
|
||||||
|
if (FileExists(svFilePath.c_str()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user