Skip to content

Commit

Permalink
fix: LocalizeAssets
Browse files Browse the repository at this point in the history
  • Loading branch information
chinosk6 committed Dec 21, 2024
1 parent 7c2516d commit b952aff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b952aff

Please sign in to comment.