No SP for now

This commit is contained in:
Federico Cecchetto 2022-03-04 20:55:45 +01:00
parent 2261c68b5b
commit 6150134f77
2 changed files with 12 additions and 10 deletions

View File

@ -296,8 +296,11 @@ namespace logfile
public: public:
void post_unpack() override void post_unpack() override
{ {
if (!game::environment::is_sp()) if (game::environment::is_sp())
{ {
return;
}
utils::hook::call(0x14048191D, client_command_stub); utils::hook::call(0x14048191D, client_command_stub);
scr_player_damage_hook.create(0x14037DC50, scr_player_damage_stub); scr_player_damage_hook.create(0x14037DC50, scr_player_damage_stub);
@ -305,7 +308,6 @@ namespace logfile
utils::hook::call(0x140484EC0, g_shutdown_game_stub); utils::hook::call(0x140484EC0, g_shutdown_game_stub);
utils::hook::call(0x1404853C1, 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); utils::hook::jump(SELECT_VALUE(0x140376655, 0x140444645), utils::hook::assemble(vm_execute_stub), true);
} }

View File

@ -127,8 +127,8 @@ namespace scripting
scr_set_thread_position_hook.create(SELECT_VALUE(0x14036A180, 0x140437D10), scr_set_thread_position_stub); 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); process_script_hook.create(SELECT_VALUE(0x1403737E0, 0x1404417E0), process_script_stub);
scr_load_level_hook.create(0x1403727C0, scr_load_level_stub); scr_load_level_hook.create(SELECT_VALUE(0x1402A5BE0, 0x1403727C0), scr_load_level_stub);
g_shutdown_game_hook.create(0x140345A60, g_shutdown_game_stub); g_shutdown_game_hook.create(SELECT_VALUE(0x140277D40, 0x140345A60), g_shutdown_game_stub);
scheduler::loop([]() scheduler::loop([]()
{ {