From 1ad875ce8a186674e881e491a8066665ba2a2552 Mon Sep 17 00:00:00 2001 From: BrentVL-1952840 <70229620+Brentdevent@users.noreply.github.com> Date: Thu, 23 Feb 2023 20:04:41 +0100 Subject: [PATCH] Set correct data on client side to join dedis - SetGameMode to default seems the way to go here, keeps switching teams available and makes sure online classes get previewed correctly. - SetGameType needs to be called so it doesn't mix things what you have selected before in private match or played before on another dedicated server. --- src/client/component/party.cpp | 6 ++++++ src/client/game/symbols.hpp | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/client/component/party.cpp b/src/client/component/party.cpp index 32957179..497927c8 100644 --- a/src/client/component/party.cpp +++ b/src/client/component/party.cpp @@ -171,6 +171,12 @@ namespace party scheduler::once([=] { + if (is_connecting_to_dedi) + { + game::Com_SessionMode_SetGameMode(game::MODE_GAME_DEFAULT); + game::Com_GametypeSettings_SetGametype(gametype.data(), false, false); + } + //connect_to_session(target, hostname, xuid, mode); connect_to_lobby_with_mode(target, mode, mapname, gametype); }, scheduler::main); diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index aa9d572f..128f8364 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -22,7 +22,9 @@ namespace game WEAK symbol Com_Error_{0x1420F8BD0}; WEAK symbol Com_SessionMode_IsMode{0x1420F7DD0}; WEAK symbol Com_SessionMode_SetNetworkMode{0x1420F8010, 0x140500B80}; - WEAK symbol Com_SessionMode_SetGameMode{0x0, 0x140500B40}; + WEAK symbol Com_SessionMode_SetGameMode{0x1420F7FD0, 0x140500B40}; + WEAK symbol Com_SessionMode_SetMode{0x1420F7FF0}; + WEAK symbol Com_GametypeSettings_SetGametype{0x1420F63E0}; WEAK symbol Com_IsRunningUILevel{0x142148DB0}; WEAK symbol Com_SwitchMode{ 0x14214AF30