diff --git a/src/client/component/auth.cpp b/src/client/component/auth.cpp index 8a750cde..59228b5d 100644 --- a/src/client/component/auth.cpp +++ b/src/client/component/auth.cpp @@ -135,11 +135,6 @@ namespace auth int send_connect_data_stub(const game::netsrc_t sock, game::netadr_t* adr, const char* data, const int len) { - for (auto& xuid : client_xuids) - { - xuid = 0; - } - try { const auto is_connect_sequence = len >= 7 && strncmp("connect", data, 7) == 0; @@ -321,6 +316,14 @@ namespace auth return xuid; } + void clear_stored_guids() + { + for (auto& xuid : client_xuids) + { + xuid = 0; + } + } + struct component final : generic_component { void post_unpack() override diff --git a/src/client/component/auth.hpp b/src/client/component/auth.hpp index 87c07f5e..30341c98 100644 --- a/src/client/component/auth.hpp +++ b/src/client/component/auth.hpp @@ -4,4 +4,5 @@ namespace auth { uint64_t get_guid(); uint64_t get_guid(size_t client_num); + void clear_stored_guids(); } diff --git a/src/client/component/party.cpp b/src/client/component/party.cpp index 837a97f9..403c0c3a 100644 --- a/src/client/component/party.cpp +++ b/src/client/component/party.cpp @@ -3,6 +3,7 @@ #include "game/game.hpp" #include "party.hpp" +#include "auth.hpp" #include "network.hpp" #include "scheduler.hpp" #include "workshop.hpp" @@ -39,6 +40,8 @@ namespace party void connect_to_lobby(const game::netadr_t& addr, const std::string& mapname, const std::string& gamemode, const std::string& usermap_id, const std::string& mod_id) { + auth::clear_stored_guids(); + workshop::load_mod_if_needed(usermap_id, mod_id); game::XSESSION_INFO info{}; @@ -56,7 +59,8 @@ namespace party } void connect_to_lobby_with_mode(const game::netadr_t& addr, const game::eModes mode, const std::string& mapname, - const std::string& gametype, const std::string& usermap_id, const std::string& mod_id, + const std::string& gametype, const std::string& usermap_id, + const std::string& mod_id, const bool was_retried = false) { if (game::Com_SessionMode_IsMode(mode)) @@ -189,7 +193,7 @@ namespace party const auto usermap_id = workshop::get_usermap_publisher_id(mapname); if (workshop::check_valid_usermap_id(mapname, usermap_id) && - workshop::check_valid_mod_id(mod_id)) + workshop::check_valid_mod_id(mod_id)) { if (is_connecting_to_dedi) {