diff --git a/src/client/component/logfile.cpp b/src/client/component/logfile.cpp index db291587..fc949d92 100644 --- a/src/client/component/logfile.cpp +++ b/src/client/component/logfile.cpp @@ -296,17 +296,19 @@ namespace logfile public: void post_unpack() override { - if (!game::environment::is_sp()) + if (game::environment::is_sp()) { - utils::hook::call(0x14048191D, client_command_stub); - - scr_player_damage_hook.create(0x14037DC50, scr_player_damage_stub); - scr_player_killed_hook.create(0x14037DF30, scr_player_killed_stub); - - utils::hook::call(0x140484EC0, g_shutdown_game_stub); - utils::hook::call(0x1404853C1, g_shutdown_game_stub); + return; } + utils::hook::call(0x14048191D, client_command_stub); + + scr_player_damage_hook.create(0x14037DC50, scr_player_damage_stub); + scr_player_killed_hook.create(0x14037DF30, scr_player_killed_stub); + + 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/component/scripting.cpp b/src/client/component/scripting.cpp index 6cdb54e0..e3116122 100644 --- a/src/client/component/scripting.cpp +++ b/src/client/component/scripting.cpp @@ -127,8 +127,8 @@ namespace scripting scr_set_thread_position_hook.create(SELECT_VALUE(0x14036A180, 0x140437D10), scr_set_thread_position_stub); process_script_hook.create(SELECT_VALUE(0x1403737E0, 0x1404417E0), process_script_stub); - scr_load_level_hook.create(0x1403727C0, scr_load_level_stub); - g_shutdown_game_hook.create(0x140345A60, g_shutdown_game_stub); + scr_load_level_hook.create(SELECT_VALUE(0x1402A5BE0, 0x1403727C0), scr_load_level_stub); + g_shutdown_game_hook.create(SELECT_VALUE(0x140277D40, 0x140345A60), g_shutdown_game_stub); scheduler::loop([]() {