From de9e2397115fb8ef4d744129a0bd704ac698e20e Mon Sep 17 00:00:00 2001 From: BrentVL-1952840 <70229620+Brentdevent@users.noreply.github.com> Date: Sat, 4 Mar 2023 12:36:06 +0100 Subject: [PATCH] Update console --- src/client/component/console.cpp | 14 +++++++------- src/client/game/symbols.hpp | 22 +++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/client/component/console.cpp b/src/client/component/console.cpp index 9db40451..706ad825 100644 --- a/src/client/component/console.cpp +++ b/src/client/component/console.cpp @@ -54,7 +54,7 @@ namespace console { a.push(rbx); a.mov(eax, 0x8030); - a.jmp(game::select(0x142333667, 0x140597527)); + a.jmp(game::select(0x142332AA7, 0x140597527)); }); static_cast(print_func)(message); @@ -105,13 +105,13 @@ namespace console game::Cbuf_AddText(0, "quit\n"); [[fallthrough]]; default: - return utils::hook::invoke(game::select(0x142333520, 0x1405973E0), hwnd, msg, wparam, lparam); + return utils::hook::invoke(game::select(0x142332960, 0x1405973E0), hwnd, msg, wparam, lparam); } } LRESULT input_line_wnd_proc(const HWND hwnd, const UINT msg, const WPARAM wparam, const LPARAM lparam) { - return utils::hook::invoke(game::select(0x142333820, 0x1405976E0), hwnd, msg, wparam, lparam); + return utils::hook::invoke(game::select(0x142332C60, 0x1405976E0), hwnd, msg, wparam, lparam); } void sys_create_console_stub(const HINSTANCE h_instance) @@ -212,8 +212,8 @@ namespace console utils::hook::set(0x14133D2FE_g, 0xEB); // Always enable ingame console } - utils::hook::jump(game::select(0x1423337F0, 0x1405976B0), queue_message); - utils::hook::nop(game::select(0x14233380A, 0x1405976CA), 2); // Print from every thread + utils::hook::jump(game::select(0x142332C30, 0x1405976B0), queue_message); + utils::hook::nop(game::select(0x142332C4A, 0x1405976CA), 2); // Print from every thread //const auto self = utils::nt::library::get_by_address(sys_create_console_stub); //logo = LoadImageA(self.get_handle(), MAKEINTRESOURCEA(IMAGE_LOGO), 0, 0, 0, LR_COPYFROMRESOURCE); @@ -251,7 +251,7 @@ namespace console { { static utils::hook::detour sys_create_console_hook; - sys_create_console_hook.create(game::select(0x1423339C0, 0x140597880), sys_create_console_stub); + sys_create_console_hook.create(game::select(0x142332E00, 0x140597880), sys_create_console_stub); game::Sys_ShowConsole(); started = true; @@ -299,4 +299,4 @@ namespace console }; } -REGISTER_COMPONENT(console::component) +REGISTER_COMPONENT_WORKING(console::component) diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 7eb0445c..818a975a 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -18,7 +18,7 @@ namespace game WEAK symbol G_LogPrintf{0x0, 0x1402A7BB0}; // Com - WEAK symbol Com_Printf{0x1421499C0, 0x140505630}; + WEAK symbol Com_Printf{0x142148F60, 0x140505630}; WEAK symbol Com_Error_{0x1420F8BD0, 0x140501470}; WEAK symbol Com_SessionMode_IsMode{0x1420F7DD0}; WEAK symbol Com_SessionMode_SetNetworkMode{0x1420F8010, 0x140500B80}; @@ -30,7 +30,7 @@ namespace game 0x14214AF30 }; - WEAK symbol Cbuf_AddText{0x1420EC8B0, 0x1404F75B0}; + WEAK symbol Cbuf_AddText{0x1420EC010, 0x1404F75B0}; WEAK symbol Cbuf_ExecuteBuffer{ 0x14133BE10, 0x1404F78D0 }; @@ -74,7 +74,7 @@ namespace game // Sys WEAK symbol Sys_Milliseconds{0x142333430}; - WEAK symbol Sys_ShowConsole{0x142333F80, 0x140597E40}; + WEAK symbol Sys_ShowConsole{0x1423333C0, 0x140597E40}; WEAK symbol Sys_GetTLS{0x142184210, 0x140525EB0}; WEAK symbol Sys_IsDatabaseReady{0x1421844C0}; @@ -155,14 +155,14 @@ namespace game namespace s_wcd { - WEAK symbol codLogo{0x157E77A50, 0x14A640BC0}; - WEAK symbol hfBufferFont{0x157E77A58, 0x14A640BC8}; - WEAK symbol hWnd{0x157E77A40, 0x14A640BB0}; - WEAK symbol hwndBuffer{0x157E77A48, 0x14A640BB8}; - WEAK symbol hwndInputLine{0x157E77A60, 0x14A640BD0}; - WEAK symbol windowHeight{0x157E7806C, 0x14A6411DC}; - WEAK symbol windowWidth{0x157E78068, 0x14A6411D8}; - WEAK symbol SysInputLineWndProc{0x157E78070, 0x14A6411E0}; + WEAK symbol codLogo{0x157E75A50, 0x14A640BC0}; + WEAK symbol hfBufferFont{0x157E75A58, 0x14A640BC8}; + WEAK symbol hWnd{0x157E75A40, 0x14A640BB0}; + WEAK symbol hwndBuffer{0x157E75A48, 0x14A640BB8}; + WEAK symbol hwndInputLine{0x157E75A60, 0x14A640BD0}; + WEAK symbol windowHeight{0x157E7606C, 0x14A6411DC}; + WEAK symbol windowWidth{0x157E76068, 0x14A6411D8}; + WEAK symbol SysInputLineWndProc{0x157E76070, 0x14A6411E0}; } // Global game definitions