diff --git a/src/client/component/mods.cpp b/src/client/component/mods.cpp index a231f361..83c0f6dd 100644 --- a/src/client/component/mods.cpp +++ b/src/client/component/mods.cpp @@ -58,8 +58,7 @@ namespace mods command::execute("vid_restart"); scheduler::once([] { - demonware::set_storage_path(mod_path.value_or("")); - utils::hook::invoke(0x4E6B60_b, 0); // read stats + mods::read_stats(); }, scheduler::main); return; } @@ -113,6 +112,12 @@ namespace mods return mod_path; } + void read_stats() + { + demonware::set_storage_path(mod_path.value_or("")); + utils::hook::invoke(0x4E6B60_b, 0); // read stats + } + class component final : public component_interface { public: diff --git a/src/client/component/mods.hpp b/src/client/component/mods.hpp index 1288ede9..950e2c23 100644 --- a/src/client/component/mods.hpp +++ b/src/client/component/mods.hpp @@ -4,4 +4,5 @@ namespace mods { void set_mod(const std::string& path, bool change_fs_game = true); std::optional get_mod(); + void read_stats(); } diff --git a/src/client/component/party.cpp b/src/client/component/party.cpp index 02413bab..e5184bb4 100644 --- a/src/client/component/party.cpp +++ b/src/client/component/party.cpp @@ -435,6 +435,7 @@ namespace party needs_vid_restart = false; scheduler::once([=]() { + mods::read_stats(); connect(target); }, scheduler::pipeline::main); return true;