From b88c8d3eb013428df3cc6c599c822ec95966291d Mon Sep 17 00:00:00 2001 From: Federico Cecchetto Date: Fri, 8 Apr 2022 18:24:35 +0200 Subject: [PATCH] Some fixes --- src/client/component/logfile.cpp | 4 ++-- src/client/game/scripting/lua/engine.cpp | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client/component/logfile.cpp b/src/client/component/logfile.cpp index d1886ca0..08ce07dd 100644 --- a/src/client/component/logfile.cpp +++ b/src/client/component/logfile.cpp @@ -296,6 +296,8 @@ namespace logfile public: void post_unpack() override { + utils::hook::jump(SELECT_VALUE(0x140376655, 0x140444645), utils::hook::assemble(vm_execute_stub), true); + if (game::environment::is_sp()) { return; @@ -308,8 +310,6 @@ namespace logfile utils::hook::call(0x140484EC0, g_shutdown_game_stub); utils::hook::call(0x1404853C1, g_shutdown_game_stub); - - utils::hook::jump(SELECT_VALUE(0x140376655, 0x140444645), utils::hook::assemble(vm_execute_stub), true); } }; } diff --git a/src/client/game/scripting/lua/engine.cpp b/src/client/game/scripting/lua/engine.cpp index 936c8e1f..6d025409 100644 --- a/src/client/game/scripting/lua/engine.cpp +++ b/src/client/game/scripting/lua/engine.cpp @@ -49,7 +49,7 @@ namespace scripting::lua::engine void start() { stop(); - + running = true; for (const auto& path : filesystem::get_search_paths()) { load_scripts(path + "/scripts/"); @@ -62,8 +62,6 @@ namespace scripting::lua::engine load_scripts(path + "/scripts/mp/"); } } - - running = true; } void notify(const event& e)