diff --git a/src/client/component/bots.cpp b/src/client/component/bots.cpp index 23ca2bc5..e07aa9b8 100644 --- a/src/client/component/bots.cpp +++ b/src/client/component/bots.cpp @@ -118,7 +118,7 @@ namespace bots void post_unpack() override { utils::hook::jump(game::select(0x141653B70, 0x1402732E0), get_bot_name); - utils::hook::call(game::select(0x142249AF7, 0x14052E53A), format_bot_string); + utils::hook::call(game::select(0x142249097, 0x14052E53A), format_bot_string); if (!game::is_server()) { @@ -157,4 +157,4 @@ namespace bots }; } -REGISTER_COMPONENT(bots::component) +REGISTER_COMPONENT_WORKING(bots::component) diff --git a/src/client/component/branding.cpp b/src/client/component/branding.cpp index dc8a48d6..c5539723 100644 --- a/src/client/component/branding.cpp +++ b/src/client/component/branding.cpp @@ -34,4 +34,4 @@ namespace branding }; } -REGISTER_COMPONENT(branding::component) +REGISTER_COMPONENT_WORKING(branding::component) diff --git a/src/client/component/client_patches.cpp b/src/client/component/client_patches.cpp index 0a2cf29d..e2f71ebc 100644 --- a/src/client/component/client_patches.cpp +++ b/src/client/component/client_patches.cpp @@ -79,11 +79,11 @@ namespace client_patches fix_amd_cpu_stuttering(); // Kill microphones for now - utils::hook::set(0x15AAEB254_g, mixer_open_stub); + utils::hook::set(0x15AAE9254_g, mixer_open_stub); preload_map_hook.create(0x14135A1E0_g, preload_map_stub); } }; } -REGISTER_COMPONENT(client_patches::component) +REGISTER_COMPONENT_WORKING(client_patches::component) diff --git a/src/client/component/command.cpp b/src/client/component/command.cpp index 767e328e..c5d8b35b 100644 --- a/src/client/component/command.cpp +++ b/src/client/component/command.cpp @@ -71,7 +71,7 @@ namespace command void post_unpack() override { // Disable whitelist - utils::hook::jump(game::select(0x1420EF190, 0x1404F9CD0), update_whitelist_stub); + utils::hook::jump(game::select(0x1420EE860, 0x1404F9CD0), update_whitelist_stub); } }; @@ -194,4 +194,4 @@ namespace command } } -REGISTER_COMPONENT(command::component) +REGISTER_COMPONENT_WORKING(command::component) diff --git a/src/client/component/dvars.cpp b/src/client/component/dvars.cpp index 5d06b85a..c8173948 100644 --- a/src/client/component/dvars.cpp +++ b/src/client/component/dvars.cpp @@ -202,23 +202,23 @@ namespace dvars if (!game::is_server()) { scheduler::once(read_archive_dvars, scheduler::pipeline::main); - dvar_set_variant_hook.create(0x1422C9A90_g, dvar_set_variant_stub); + dvar_set_variant_hook.create(0x1422C9030_g, dvar_set_variant_stub); // Show all known dvars in console - utils::hook::jump(0x1422BD890_g, dvar_for_each_name_stub); - utils::hook::jump(0x1422BD7E0_g, dvar_for_each_name_client_num_stub); + utils::hook::jump(0x1422BCE30_g, dvar_for_each_name_stub); + utils::hook::jump(0x1422BCD80_g, dvar_for_each_name_client_num_stub); } scheduler::once(copy_dvar_names_to_pool, scheduler::pipeline::main); // All dvars are recognized as command - utils::hook::nop(game::select(0x14215297A, 0x14050949A), 2); + utils::hook::nop(game::select(0x142151F1A, 0x14050949A), 2); // Show all dvars in dvarlist command - utils::hook::nop(game::select(0x142152C87, 0x140509797), 6); + utils::hook::nop(game::select(0x142152227, 0x140509797), 6); // Show all dvars in dvardump command - utils::hook::nop(game::select(0x142152659, 0x140509179), 6); + utils::hook::nop(game::select(0x142151BF9, 0x140509179), 6); } }; } -REGISTER_COMPONENT(dvars::component) +REGISTER_COMPONENT_WORKING(dvars::component) diff --git a/src/client/component/getinfo.cpp b/src/client/component/getinfo.cpp index 5478d56a..36c34aab 100644 --- a/src/client/component/getinfo.cpp +++ b/src/client/component/getinfo.cpp @@ -24,7 +24,7 @@ namespace getinfo int get_client_count() { int count = 0; - const auto client_states = *reinterpret_cast(game::select(0x1576FB318, 0x14A178E98)); + const auto client_states = *reinterpret_cast(game::select(0x1576F9318, 0x14A178E98)); if (!client_states) { return 0; @@ -46,7 +46,7 @@ namespace getinfo int get_bot_count() { - const auto client_states = *reinterpret_cast(game::select(0x1576FB318, 0x14A178E98)); + const auto client_states = *reinterpret_cast(game::select(0x1576F9318, 0x14A178E98)); if (!client_states) { return 0; @@ -69,7 +69,7 @@ namespace getinfo { int Com_SessionMode_GetGameMode() { - return *reinterpret_cast(game::select(0x1568EF7F4, 0x14948DB04)) << 14 >> 28; + return *reinterpret_cast(game::select(0x1568ED7F4, 0x14948DB04)) << 14 >> 28; } } @@ -119,4 +119,4 @@ namespace getinfo }; } -REGISTER_COMPONENT(getinfo::component) +REGISTER_COMPONENT_WORKING(getinfo::component) diff --git a/src/client/component/loot.cpp b/src/client/component/loot.cpp index 928abbe6..b675cc62 100644 --- a/src/client/component/loot.cpp +++ b/src/client/component/loot.cpp @@ -62,9 +62,9 @@ namespace loot dvar_cg_unlockall_loot = game::Dvar_RegisterBool(game::Dvar_GenerateHash("cg_unlockall_loot"), "cg_unlockall_loot", false, (game::dvarFlags_e)0x0, "Unlocks blackmarket loot"); dvar_cg_unlockall_loot->debugName = "cg_unlockall_loot"; - loot_getitemquantity_hook.create(0x141E82C90_g, loot_getitemquantity_stub); - liveinventory_getitemquantity_hook.create(0x141E090C0_g, liveinventory_getitemquantity_stub); - liveinventory_areextraslotspurchased_hook.create(0x141E089E0_g, liveinventory_areextraslotspurchased_stub); + loot_getitemquantity_hook.create(0x141E82C00_g, loot_getitemquantity_stub); + liveinventory_getitemquantity_hook.create(0x141E09030_g, liveinventory_getitemquantity_stub); + liveinventory_areextraslotspurchased_hook.create(0x141E08950_g, liveinventory_areextraslotspurchased_stub); scheduler::once([]() { if (dvar_cg_unlockall_loot->current.enabled) @@ -76,4 +76,4 @@ namespace loot }; }; -REGISTER_COMPONENT(loot::component) +REGISTER_COMPONENT_WORKING(loot::component) diff --git a/src/client/component/network.cpp b/src/client/component/network.cpp index ebe2a124..77847a20 100644 --- a/src/client/component/network.cpp +++ b/src/client/component/network.cpp @@ -237,22 +237,22 @@ namespace network { void post_unpack() override { - utils::hook::nop(game::select(0x142332E76, 0x140596DF6), 4); // don't increment data pointer to optionally skip socket byte - utils::hook::call(game::select(0x142332E43, 0x140596DC3), read_socket_byte_stub); // optionally read socket byte - utils::hook::call(game::select(0x142332E81, 0x140596E01), verify_checksum_stub); // skip checksum verification - utils::hook::set(game::select(0x14233305E, 0x140596F2E), 0); // don't add checksum to packet + utils::hook::nop(game::select(0x1423322B6, 0x140596DF6), 4); // don't increment data pointer to optionally skip socket byte + utils::hook::call(game::select(0x142332283, 0x140596DC3), read_socket_byte_stub); // optionally read socket byte + utils::hook::call(game::select(0x1423322C1, 0x140596E01), verify_checksum_stub); // skip checksum verification + utils::hook::set(game::select(0x14233249E, 0x140596F2E), 0); // don't add checksum to packet utils::hook::set(game::select(0x14134C6E0, 0x14018E574), 5); // set initial connection state to challenging // intercept command handling utils::hook::call(game::select(0x14134D146, 0x14018EED0), utils::hook::assemble(handle_command_stub)); - utils::hook::set(game::select(0x14224E90D, 0x1405315F9), 0xEB); // don't kick clients without dw handle + utils::hook::set(game::select(0x14224DEAD, 0x1405315F9), 0xEB); // don't kick clients without dw handle // Skip DW stuff in NetAdr_ToString - utils::hook::set(game::select(0x142173952, 0x140515881), 0xEB); + utils::hook::set(game::select(0x142172EF2, 0x140515881), 0xEB); // NA_IP -> NA_RAWIP in NetAdr_ToString - utils::hook::set(game::select(0x142173934, 0x140515864), game::NA_RAWIP); + utils::hook::set(game::select(0x142172ED4, 0x140515864), game::NA_RAWIP); if (game::is_server()) { @@ -264,9 +264,9 @@ namespace network scheduler::once(create_ip_socket, scheduler::main); // Kill lobby system - handle_packet_internal_hook.create(game::select(0x141EF8030, 0x1404A5B90), &handle_packet_internal_stub); + handle_packet_internal_hook.create(game::select(0x141EF7FE0, 0x1404A5B90), &handle_packet_internal_stub); } }; } -REGISTER_COMPONENT(network::component) +REGISTER_COMPONENT_WORKING(network::component) diff --git a/src/client/component/party.cpp b/src/client/component/party.cpp index e7490803..4065c3ef 100644 --- a/src/client/component/party.cpp +++ b/src/client/component/party.cpp @@ -44,7 +44,7 @@ namespace party { scheduler::once([=] { - const auto local_client = *reinterpret_cast(0x14342355C_g); + const auto local_client = *reinterpret_cast(0x14342155C_g); const auto current_mode = game::Com_SessionMode_GetMode(); game::Com_SwitchMode(local_client, current_mode, mode, 6); }, scheduler::main); @@ -90,7 +90,7 @@ namespace party { const auto LobbyJoin_Begin = reinterpret_cast(0x141ED9540_g); + game::LobbyType targetLobbyType)>(0x141ED94D0_g); if (!LobbyJoin_Begin(0, game::CONTROLLER_INDEX_FIRST, game::LOBBY_TYPE_PRIVATE, game::LOBBY_TYPE_PRIVATE)) { @@ -205,7 +205,7 @@ namespace party game::netadr_t get_connected_server() { constexpr auto local_client_num = 0ull; - const auto address = *reinterpret_cast(0x1453DABB8_g) + (0x25780 * local_client_num) + 0x10; + const auto address = *reinterpret_cast(0x1453D8BB8_g) + (0x25780 * local_client_num) + 0x10; return *reinterpret_cast(address); } @@ -297,7 +297,7 @@ namespace party { void post_unpack() override { - utils::hook::jump(0x141EE6030_g, &connect_stub); + utils::hook::jump(0x141EE5FE0_g, &connect_stub); network::on("infoResponse", handle_info_response); scheduler::loop(cleanup_queried_servers, scheduler::async, 200ms); @@ -313,4 +313,4 @@ namespace party }; } -REGISTER_COMPONENT(party::component) +REGISTER_COMPONENT_WORKING(party::component) diff --git a/src/client/component/patches.cpp b/src/client/component/patches.cpp index abe3c552..54ce700c 100644 --- a/src/client/component/patches.cpp +++ b/src/client/component/patches.cpp @@ -33,4 +33,4 @@ namespace patches }; } -REGISTER_COMPONENT(patches::component) +REGISTER_COMPONENT_WORKING(patches::component) diff --git a/src/client/component/scheduler.cpp b/src/client/component/scheduler.cpp index 8b5ae514..b22dc659 100644 --- a/src/client/component/scheduler.cpp +++ b/src/client/component/scheduler.cpp @@ -168,12 +168,11 @@ namespace scheduler { if (!game::is_server()) { - r_end_frame_hook.create(0x142273560_g, r_end_frame_stub); + r_end_frame_hook.create(0x142272B00_g, r_end_frame_stub); // some func called before R_EndFrame, maybe SND_EndFrame? } - //g_run_frame_hook.create(0x14065C360_g, server_frame_stub); // GlassSv_Update - main_frame_hook.create(game::select(0x1420F9860, 0x1405020E0), main_frame_stub); + main_frame_hook.create(game::select(0x1420F8E00, 0x1405020E0), main_frame_stub); // Com_Frame_Try_Block_Function } @@ -188,4 +187,4 @@ namespace scheduler }; } -REGISTER_COMPONENT(scheduler::component) +REGISTER_COMPONENT_WORKING(scheduler::component) diff --git a/src/client/component/script.cpp b/src/client/component/script.cpp index 7bdc3241..b32c4b19 100644 --- a/src/client/component/script.cpp +++ b/src/client/component/script.cpp @@ -134,4 +134,4 @@ namespace script }; }; -REGISTER_COMPONENT(script::component) +REGISTER_COMPONENT_WORKING(script::component) diff --git a/src/client/component/ui_scripting.cpp b/src/client/component/ui_scripting.cpp index baa565b9..b52d8136 100644 --- a/src/client/component/ui_scripting.cpp +++ b/src/client/component/ui_scripting.cpp @@ -454,10 +454,10 @@ namespace ui_scripting utils::hook::call(game::select(0x141D4979A, 0x1403F233A), hks_load_stub); hks_package_require_hook.create(game::select(0x141D28EF0, 0x1403D7FC0), hks_package_require_stub); - ui_cod_init_hook.create(game::select(0x141F298B0, 0x1404A0A50), ui_cod_init_stub); - ui_cod_lobbyui_init_hook.create(game::select(0x141F2C620, 0x1404A1F50), ui_cod_lobbyui_init_stub); - ui_shutdown_hook.create(game::select(0x14270E9C0, 0x1404A1280), ui_shutdown_stub); - lua_cod_getrawfile_hook.create(game::select(0x141F0F880, 0x1404BCB70), lua_cod_getrawfile_stub); + ui_cod_init_hook.create(game::UI_CoD_Init, ui_cod_init_stub); + ui_cod_lobbyui_init_hook.create(game::UI_CoD_LobbyUI_Init, ui_cod_lobbyui_init_stub); + ui_shutdown_hook.create(game::UI_CoD_Shutdown, ui_shutdown_stub); + lua_cod_getrawfile_hook.create(game::select(0x141F0EFE0, 0x1404BCB70), lua_cod_getrawfile_stub); if (game::is_server()) { @@ -507,4 +507,4 @@ namespace ui_scripting }; } -REGISTER_COMPONENT(ui_scripting::component) +REGISTER_COMPONENT_WORKING(ui_scripting::component) diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 63ce0ff6..48f8b4bd 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -99,9 +99,9 @@ namespace game }; // UI - WEAK symbol UI_CoD_Init{0x141F29010, 0x0}; - WEAK symbol UI_CoD_LobbyUI_Init{0x141F2BD80, 0x0}; - WEAK symbol UI_CoD_Shutdown{0x141F32E10, 0x0}; + WEAK symbol UI_CoD_Init{0x141F29010, 0x1404A0A50}; + WEAK symbol UI_CoD_LobbyUI_Init{0x141F2BD80, 0x1404A1F50}; + WEAK symbol UI_CoD_Shutdown{0x141F32E10, 0x1404A1280}; WEAK symbol UI_AddMenu{0x1427018F0, 0x0}; WEAK symbol UI_CoD_GetRootNameForController{0x141F28940, 0x0}; WEAK symbol Lua_CoD_LoadLuaFile{0x141F11A20, 0x0};