From d35c2a99cf7ebcc440ed39458944c004068ff958 Mon Sep 17 00:00:00 2001 From: BrentVL-1952840 <70229620+Brentdevent@users.noreply.github.com> Date: Tue, 21 Feb 2023 20:49:35 +0100 Subject: [PATCH 1/2] Fix connecting to zombie dedicated servers --- src/client/component/party.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/client/component/party.cpp b/src/client/component/party.cpp index bf938631..c653be48 100644 --- a/src/client/component/party.cpp +++ b/src/client/component/party.cpp @@ -228,14 +228,22 @@ namespace party return *reinterpret_cast(address); } + bool is_mp() + { + return game::Com_SessionMode_GetMode() == game::MODE_MULTIPLAYER; + } + int should_transfer_stub(uint8_t* storage_file_info) { auto should_transfer = game::ShouldTransfer(storage_file_info); - const auto offset = storage_file_info - reinterpret_cast(0x14343CDF0_g); const auto index = offset / 120; - if (index >= 12 && index <= 15 && is_connecting_to_dedi && get_connected_server() == connect_host) + // Choose between multiplayer or zombies indices + const auto stats_index = is_mp() ? 12 : 15; + const auto loadout_index = is_mp() ? 17 : 20; + + if (index >= stats_index && index <= loadout_index && is_connecting_to_dedi && get_connected_server() == connect_host) { should_transfer = !should_transfer; } From 4c8df5d6cc357b448417571f46ed040233331314 Mon Sep 17 00:00:00 2001 From: BrentVL-1952840 <70229620+Brentdevent@users.noreply.github.com> Date: Tue, 21 Feb 2023 21:06:39 +0100 Subject: [PATCH 2/2] woops --- src/client/component/party.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/component/party.cpp b/src/client/component/party.cpp index c653be48..aed71cff 100644 --- a/src/client/component/party.cpp +++ b/src/client/component/party.cpp @@ -240,8 +240,8 @@ namespace party const auto index = offset / 120; // Choose between multiplayer or zombies indices - const auto stats_index = is_mp() ? 12 : 15; - const auto loadout_index = is_mp() ? 17 : 20; + const auto stats_index = is_mp() ? 12 : 17; + const auto loadout_index = is_mp() ? 15 : 20; if (index >= stats_index && index <= loadout_index && is_connecting_to_dedi && get_connected_server() == connect_host) {