From 884efc7ce75c2d0bde8c919939a169b9e4f69719 Mon Sep 17 00:00:00 2001 From: Federico Cecchetto Date: Wed, 2 Mar 2022 15:01:01 +0100 Subject: [PATCH] Some fixes --- src/client/component/dvars.cpp | 2 +- src/client/component/lui.cpp | 5 ----- src/client/component/ui_scripting.cpp | 6 +++++- src/client/game/symbols.hpp | 10 +++++----- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/client/component/dvars.cpp b/src/client/component/dvars.cpp index 4a086a27..d9c77fdf 100644 --- a/src/client/component/dvars.cpp +++ b/src/client/component/dvars.cpp @@ -435,7 +435,7 @@ namespace dvars dvar_set_float_hook.create(SELECT_VALUE(0x1403C7420, 0x1404FD360), &dvar_set_float); dvar_set_int_hook.create(SELECT_VALUE(0x1403C76C0, 0x1404FD5E0), &dvar_set_int); dvar_set_string_hook.create(SELECT_VALUE(0x1403C7900, 0x1404FD8D0), &dvar_set_string); - dvar_set_from_string_hook.create(SELECT_VALUE(0, 0x1404FD520), &dvar_set_from_string); + dvar_set_from_string_hook.create(SELECT_VALUE(0x1403C7620, 0x1404FD520), &dvar_set_from_string); } }; } diff --git a/src/client/component/lui.cpp b/src/client/component/lui.cpp index 1407d471..d3a7edca 100644 --- a/src/client/component/lui.cpp +++ b/src/client/component/lui.cpp @@ -15,11 +15,6 @@ namespace lui public: void post_unpack() override { - if (!game::environment::is_mp()) - { - return; - } - // Don't show create cod account popup //utils::hook::set(0x14017C957, 0); // H1(1.4) diff --git a/src/client/component/ui_scripting.cpp b/src/client/component/ui_scripting.cpp index 421abf06..941dda10 100644 --- a/src/client/component/ui_scripting.cpp +++ b/src/client/component/ui_scripting.cpp @@ -160,10 +160,14 @@ namespace ui_scripting hks_start_hook.create(SELECT_VALUE(0x1400E4B40, 0x140176A40), hks_start_stub); hks_shutdown_hook.create(SELECT_VALUE(0x1400DD3D0, 0x14016CA80), hks_shutdown_stub); hksi_lual_error_hook.create(SELECT_VALUE(0x1400A5EA0, 0x14012F300), hksi_lual_error_stub); - hksi_lual_error_hook2.create(SELECT_VALUE(0x1400A5EA0, 0x1401366B0), hksi_lual_error_stub); hks_allocator_hook.create(SELECT_VALUE(0x14009B570, 0x14012BAC0), hks_allocator_stub); hks_frame_hook.create(SELECT_VALUE(0x1400E37F0, 0x1401755B0), hks_frame_stub); + if (game::environment::is_mp()) + { + hksi_lual_error_hook2.create(0x1401366B0, hksi_lual_error_stub); + } + command::add("lui_restart", []() { utils::hook::invoke(SELECT_VALUE(0x1400DD3D0, 0x14016CA80)); diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 5d57dd0b..ff0b8b64 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -97,9 +97,9 @@ namespace game WEAK symbol DB_GetXAssetTypeSize{0x14019A3B0, 0x14028BE70}; - WEAK symbol LUI_OpenMenu{0, 0x1404CD210}; + WEAK symbol LUI_OpenMenu{0x14039D5F0, 0x1404CD210}; - WEAK symbol Menu_IsMenuOpenAndVisible{0, 0x1404C7320}; + WEAK symbol Menu_IsMenuOpenAndVisible{0x1404709C0, 0x1404C7320}; WEAK symbol SL_FindString{0x140314AF0, 0x14043B470}; @@ -136,8 +136,8 @@ namespace game WEAK symbol UI_GetMapDisplayName{0, 0x140408CC0}; WEAK symbol UI_GetGameTypeDisplayName{0, 0x1404086A0}; - WEAK symbol UI_RunMenuScript{0, 0x1404CFE60}; - WEAK symbol UI_TextWidth{0, 0x1404D21A0}; + WEAK symbol UI_RunMenuScript{0x14039EFF0, 0x1404CFE60}; + WEAK symbol UI_TextWidth{0x1403A0F20, 0x1404D21A0}; WEAK symbol UI_SafeTranslateString{0x140350430, 0x14041C580}; @@ -191,7 +191,7 @@ namespace game WEAK symbol hks_obj_getfield{0x14009C0A0, 0x14012C600}; WEAK symbol hks_obj_settable{0x14009D240, 0x14012D820}; WEAK symbol hks_obj_gettable{0x14009C580, 0x14012CAE0}; - WEAK symbol vm_call_internal{0x14009D2D0, 0x140159EB0}; + WEAK symbol vm_call_internal{0x1400C87A0, 0x140159EB0}; WEAK symbol Hashtable_Create{0x14008B3B0, 0x14011B320}; WEAK symbol cclosure_Create{0x14008B5D0, 0x14011B540};