From d89398e265475b5c7868c9b2f02270794435989b Mon Sep 17 00:00:00 2001 From: Skull <86374920+skkuull@users.noreply.github.com> Date: Fri, 4 Feb 2022 07:41:33 +0200 Subject: [PATCH] singleplayer components --- src/client/component/demonware.cpp | 6 +++--- src/client/component/input.cpp | 4 ++-- src/client/component/localized_strings.cpp | 2 +- src/client/component/scheduler.cpp | 6 +++--- src/client/component/splash.cpp | 6 +++--- src/client/game/symbols.hpp | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/client/component/demonware.cpp b/src/client/component/demonware.cpp index c2994fcb..1a75d780 100644 --- a/src/client/component/demonware.cpp +++ b/src/client/component/demonware.cpp @@ -416,13 +416,13 @@ namespace demonware void post_unpack() override { - utils::hook::jump(SELECT_VALUE(0, 0x1407400B0), bd_logger_stub); // H1MP64(1.4) + utils::hook::jump(SELECT_VALUE(0x140610320, 0x1407400B0), bd_logger_stub); // H1MP64(1.4) //singleplayer not supported so far. if (game::environment::is_sp()) { - utils::hook::set(0x1405632E0, 0xC3); // bdAuthSteam - utils::hook::set(0x1402DF2C0, 0xC3); // dwNet + utils::hook::set(0x1405FCA00, 0xC3); // bdAuthSteam H1(1.4) + utils::hook::set(0x140333A00, 0xC3); // dwNet H1(1.4) return; } diff --git a/src/client/component/input.cpp b/src/client/component/input.cpp index 216b0ed6..ed446e72 100644 --- a/src/client/component/input.cpp +++ b/src/client/component/input.cpp @@ -45,8 +45,8 @@ namespace input return; } - cl_char_event_hook.create(SELECT_VALUE(0x000000000, 0x14024E810), cl_char_event_stub); - cl_key_event_hook.create(SELECT_VALUE(0x000000000, 0x14024EA60), cl_key_event_stub); + cl_char_event_hook.create(SELECT_VALUE(0x1401871A0, 0x14024E810), cl_char_event_stub); // H1(1.4) + cl_key_event_hook.create(SELECT_VALUE(0x1401874D0, 0x14024EA60), cl_key_event_stub); // H1(1.4) } }; } diff --git a/src/client/component/localized_strings.cpp b/src/client/component/localized_strings.cpp index 05ea18c9..3fd2491c 100644 --- a/src/client/component/localized_strings.cpp +++ b/src/client/component/localized_strings.cpp @@ -50,7 +50,7 @@ namespace localized_strings void post_unpack() override { // Change some localized strings - seh_string_ed_get_string_hook.create(SELECT_VALUE(0x000000000, 0x1404BB2A0), &seh_string_ed_get_string); // H1MP64(1.4) + seh_string_ed_get_string_hook.create(SELECT_VALUE(0x1403924A0, 0x1404BB2A0), &seh_string_ed_get_string); // H1(1.4) } }; } diff --git a/src/client/component/scheduler.cpp b/src/client/component/scheduler.cpp index 3a3cf97f..45565a57 100644 --- a/src/client/component/scheduler.cpp +++ b/src/client/component/scheduler.cpp @@ -160,9 +160,9 @@ namespace scheduler // } //}); - r_end_frame_hook.create(0x1405FE470, scheduler::r_end_frame_stub); // H1MP64[1.4] - g_run_frame_hook.create(0x1402772D0, scheduler::server_frame_stub); // H1MP64[1.4] - main_frame_hook.create(0x1401CE8D0, scheduler::main_frame_stub); // H1MP64[1.4] + r_end_frame_hook.create(SELECT_VALUE(0x1404F7310, 0x1405FE470), scheduler::r_end_frame_stub); // H1(1.4) + g_run_frame_hook.create(SELECT_VALUE(0x1402772D0, 0x1402772D0), scheduler::server_frame_stub); // H1(1.4) + main_frame_hook.create(SELECT_VALUE(0x1401CE8D0, 0x1401CE8D0), scheduler::main_frame_stub); // H1(1.4) } }; } diff --git a/src/client/component/splash.cpp b/src/client/component/splash.cpp index 45ca9ab5..f027cf16 100644 --- a/src/client/component/splash.cpp +++ b/src/client/component/splash.cpp @@ -30,9 +30,9 @@ namespace splash void post_unpack() override { // Disable native splash screen - utils::hook::nop(SELECT_VALUE(0, 0x1405123E2), 5); // H1MP64(1.4) - utils::hook::jump(SELECT_VALUE(0, 0x140513AF0), destroy_stub); // H1MP64(1.4) - utils::hook::jump(SELECT_VALUE(0, 0x140513B30), destroy_stub); // H1MP64(1.4) + utils::hook::nop(SELECT_VALUE(0x1403E192E, 0x1405123E2), 5); // H1(1.4) + utils::hook::jump(SELECT_VALUE(0x1403E2E70, 0x140513AF0), destroy_stub); // H1(1.4) + utils::hook::jump(SELECT_VALUE(0x1403E2EB0, 0x140513B30), destroy_stub); // H1(1.4) } void pre_destroy() override diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 62965a1a..53921c04 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -23,7 +23,7 @@ namespace game WEAK symbol Dvar_SetCommand{ 0x1403C72B0, 0x1404FD0A0 }; // H1(1.4) - WEAK symbol Com_Error{ 0, 0x1400D78A0 }; // H1(1.4) + WEAK symbol Com_Error{ 0x1403509C0, 0x1400D78A0 }; // H1(1.4) WEAK symbol CG_GameMessage{ 0x1401389A0, 0x140220CC0 }; // H1(1.4) WEAK symbol CG_GameMessageBold{ 0x140138750, 0x140220620 }; // H1(1.4)