[FileSystem] Allow executing configs in subfolders
This commit is contained in:
parent
4292443da2
commit
334cc318a4
@ -251,7 +251,14 @@ namespace Components
|
||||
|
||||
int FileSystem::ExecIsFSStub(const char* execFilename)
|
||||
{
|
||||
return !File(execFilename).exists();
|
||||
bool result = !File(execFilename).exists();
|
||||
|
||||
if(execFilename =="mp/stats_init.cfg"s)
|
||||
{
|
||||
OutputDebugStringA("");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void FileSystem::FsStartupSync(const char* a1)
|
||||
@ -290,6 +297,9 @@ namespace Components
|
||||
// Filesystem config checks
|
||||
Utils::Hook(0x6098FD, FileSystem::ExecIsFSStub, HOOK_CALL).install()->quick();
|
||||
|
||||
// Don't strip the folders from the config name (otherwise our ExecIsFSStub fails)
|
||||
Utils::Hook::Nop(0x6098F2, 5);
|
||||
|
||||
// Register additional folders
|
||||
Utils::Hook(0x482647, FileSystem::StartupStub, HOOK_JUMP).install()->quick();
|
||||
|
||||
|
@ -17,6 +17,7 @@ namespace Components
|
||||
Utils::Hook(0x59A6F8, RawFiles::LoadModdableRawfileFunc, HOOK_CALL).install()->quick();
|
||||
Utils::Hook(0x57F1E6, RawFiles::LoadModdableRawfileFunc, HOOK_CALL).install()->quick();
|
||||
Utils::Hook(0x57ED36, RawFiles::LoadModdableRawfileFunc, HOOK_CALL).install()->quick();
|
||||
//Utils::Hook(0x609832, RawFiles::LoadModdableRawfileFunc, HOOK_CALL).install()->quick();
|
||||
|
||||
// remove fs_game check for moddable rawfiles - allows non-fs_game to modify rawfiles
|
||||
Utils::Hook::Nop(0x61AB76, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user