[Localize] Remove patch that double loads str files

This commit is contained in:
FutureRave 2022-11-09 15:22:35 +00:00
parent fae304fb0a
commit cf57918d50
No known key found for this signature in database
GPG Key ID: 22F9079C86CFAB31
2 changed files with 0 additions and 30 deletions

View File

@ -76,31 +76,6 @@ namespace Components
Localization::Set(key, value); Localization::Set(key, value);
} }
void Localization::LoadLanguageStrings()
{
if (FileSystem::File(Utils::String::VA("localizedstrings/iw4x_%s.str", Game::Win_GetLanguage())).exists())
{
Game::SE_Load(Utils::String::VA("localizedstrings/iw4x_%s.str", Game::Win_GetLanguage()), 0);
}
else if (FileSystem::File("localizedstrings/iw4x_english.str").exists())
{
Game::SE_Load("localizedstrings/iw4x_english.str", 0);
}
}
__declspec(naked) void Localization::SELoadLanguageStub()
{
__asm
{
pushad
call Localization::LoadLanguageStrings
popad
push 629E20h
retn
}
}
void Localization::SetCredits() void Localization::SetCredits()
{ {
static const char* staff[] = static const char* staff[] =
@ -347,9 +322,6 @@ namespace Components
// Resolving hook // Resolving hook
Utils::Hook(0x629B90, Localization::Get, HOOK_JUMP).install()->quick(); Utils::Hook(0x629B90, Localization::Get, HOOK_JUMP).install()->quick();
// Set loading entry point
Utils::Hook(0x41D859, Localization::SELoadLanguageStub, HOOK_CALL).install()->quick();
// Overwrite SetString // Overwrite SetString
Utils::Hook(0x4CE5EE, Localization::SetStringStub, HOOK_CALL).install()->quick(); Utils::Hook(0x4CE5EE, Localization::SetStringStub, HOOK_CALL).install()->quick();

View File

@ -17,8 +17,6 @@ namespace Components
static Dvar::Var UseLocalization; static Dvar::Var UseLocalization;
static void __stdcall SetStringStub(const char* key, const char* value, bool isEnglish); static void __stdcall SetStringStub(const char* key, const char* value, bool isEnglish);
static void LoadLanguageStrings();
static void SELoadLanguageStub();
static void SetCredits(); static void SetCredits();
static const char* SEH_LocalizeTextMessageStub(const char* pszInputBuffer, const char* pszMessageType, Game::msgLocErrType_t errType); static const char* SEH_LocalizeTextMessageStub(const char* pszInputBuffer, const char* pszMessageType, Game::msgLocErrType_t errType);