From b952affe0b5719f0817f48b7cabda710c543308e Mon Sep 17 00:00:00 2001 From: chinosk <2248589280@qq.com> Date: Sat, 21 Dec 2024 16:13:35 +0000 Subject: [PATCH] fix: LocalizeAssets --- src/hook.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hook.cpp b/src/hook.cpp index 9944562d..7f751ff0 100644 --- a/src/hook.cpp +++ b/src/hook.cpp @@ -1367,8 +1367,9 @@ namespace } if (g_replace_assets) { - if (std::filesystem::exists(localPath)) { - auto replaceT2D = getLocalT2D(localPath); + const auto localReadPath = DLL_DIR / localPath; + if (std::filesystem::exists(localReadPath)) { + auto replaceT2D = getLocalT2D(localReadPath); if (replaceT2D) { result = replaceT2D; } @@ -1601,7 +1602,7 @@ namespace if (g_replace_assets) { auto object_name = get_ObjectName(texture2D); - static std::filesystem::path baseSearchPath = "localized_data/res/texture2d"; + static std::filesystem::path baseSearchPath = DLL_DIR / "localized_data/res/texture2d"; if (object_name) { const std::wstring objName(object_name->start_char);