and i also forgot one hook

This commit is contained in:
Diavolo 2024-01-20 14:30:24 +01:00
parent e4c2ddc9f2
commit 1dd3416653
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5

View File

@ -524,6 +524,27 @@ namespace Components
} }
} }
bool FastFiles::DB_FileExists_Hk(const char* zoneName, Game::FF_DIR source)
{
char filename[256]{};
DB_BuildOSPath_FromSource_Default(zoneName, source, sizeof(filename), filename);
if (auto zoneFile = Game::Sys_OpenFileReliable(filename); zoneFile != INVALID_HANDLE_VALUE)
{
CloseHandle(zoneFile);
return true;
}
DB_BuildOSPath_FromSource_Custom(zoneName, source, sizeof(filename), filename);
if (auto zoneFile = Game::Sys_OpenFileReliable(filename); zoneFile != INVALID_HANDLE_VALUE)
{
CloseHandle(zoneFile);
return true;
}
return false;
}
Game::Sys_File FastFiles::Sys_CreateFile_Stub(const char* dir, const char* filename) Game::Sys_File FastFiles::Sys_CreateFile_Stub(const char* dir, const char* filename)
{ {
static_assert(sizeof(Game::Sys_File) == 4); static_assert(sizeof(Game::Sys_File) == 4);