Better fix for clearing stored guids
This commit is contained in:
parent
07362a41ef
commit
4cab2a73bd
@ -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
|
||||
|
@ -4,4 +4,5 @@ namespace auth
|
||||
{
|
||||
uint64_t get_guid();
|
||||
uint64_t get_guid(size_t client_num);
|
||||
void clear_stored_guids();
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user