[Dedicated] Transmit original steam ids
This commit is contained in:
parent
1bec54a587
commit
e71409da28
@ -86,6 +86,19 @@ namespace Components
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Steam::Proxy::SteamUser_)
|
||||||
|
{
|
||||||
|
infostr.set("realsteamId", Utils::String::VA("%llX", Steam::Proxy::SteamUser_->GetSteamID().Bits));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build new connect string
|
||||||
|
connectString.clear();
|
||||||
|
connectString.append(params[0]);
|
||||||
|
connectString.append(" ");
|
||||||
|
connectString.append(params[1]);
|
||||||
|
connectString.append(" ");
|
||||||
|
connectString.append("\"" + infostr.build() + "\"");
|
||||||
|
|
||||||
Game::SV_Cmd_EndTokenizedString();
|
Game::SV_Cmd_EndTokenizedString();
|
||||||
|
|
||||||
Proto::Auth::Connect connectData;
|
Proto::Auth::Connect connectData;
|
||||||
|
@ -5,7 +5,7 @@ namespace Components
|
|||||||
Utils::Signal<Dedicated::Callback> Dedicated::FrameSignal;
|
Utils::Signal<Dedicated::Callback> Dedicated::FrameSignal;
|
||||||
Utils::Signal<Dedicated::Callback> Dedicated::FrameOnceSignal;
|
Utils::Signal<Dedicated::Callback> Dedicated::FrameOnceSignal;
|
||||||
|
|
||||||
SteamID Dedicated::PlayerGuids[18];
|
SteamID Dedicated::PlayerGuids[18][2];
|
||||||
|
|
||||||
bool Dedicated::SendChat;
|
bool Dedicated::SendChat;
|
||||||
|
|
||||||
@ -149,10 +149,13 @@ namespace Components
|
|||||||
if (Game::svs_clients[i].state >= 3)
|
if (Game::svs_clients[i].state >= 3)
|
||||||
{
|
{
|
||||||
list.append(Utils::String::VA(" %llX", Game::svs_clients[i].steamid));
|
list.append(Utils::String::VA(" %llX", Game::svs_clients[i].steamid));
|
||||||
|
|
||||||
|
Utils::InfoString info(Game::svs_clients[i].connectInfoString);
|
||||||
|
list.append(Utils::String::VA(" %llX", strtoull(info.get("realsteamId").data(), nullptr, 16)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
list.append(" 0");
|
list.append(" 0 0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,11 +214,14 @@ namespace Components
|
|||||||
{
|
{
|
||||||
Command::ClientParams params;
|
Command::ClientParams params;
|
||||||
|
|
||||||
if (params.length() > 17 && params.get(0)[0] == 20)
|
ZeroMemory(Dedicated::PlayerGuids, sizeof(Dedicated::PlayerGuids));
|
||||||
|
|
||||||
|
if (params.length() >= (18 * 2 + 1) && params.get(0)[0] == 20)
|
||||||
{
|
{
|
||||||
for (int client = 0; client < 18; client++)
|
for (int client = 0; client < 18; client++)
|
||||||
{
|
{
|
||||||
Dedicated::PlayerGuids[client].Bits = strtoull(params.get(client + 1), nullptr, 16);
|
Dedicated::PlayerGuids[client][0].Bits = strtoull(params.get(2 * client + 1), nullptr, 16);
|
||||||
|
Dedicated::PlayerGuids[client][1].Bits = strtoull(params.get(2 * client + 2), nullptr, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@ -546,7 +552,8 @@ namespace Components
|
|||||||
{
|
{
|
||||||
for(int i = 0; i < ARRAYSIZE(Dedicated::PlayerGuids); ++i)
|
for(int i = 0; i < ARRAYSIZE(Dedicated::PlayerGuids); ++i)
|
||||||
{
|
{
|
||||||
Dedicated::PlayerGuids[i].Bits = 0;
|
Dedicated::PlayerGuids[i][0].Bits = 0;
|
||||||
|
Dedicated::PlayerGuids[i][1].Bits = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Intercept server commands
|
// Intercept server commands
|
||||||
|
@ -14,7 +14,7 @@ namespace Components
|
|||||||
const char* getName() override { return "Dedicated"; };
|
const char* getName() override { return "Dedicated"; };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static SteamID PlayerGuids[18];
|
static SteamID PlayerGuids[18][2];
|
||||||
|
|
||||||
static bool IsEnabled();
|
static bool IsEnabled();
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ namespace Components
|
|||||||
if (clientNum < 0 || clientNum >= ARRAYSIZE(Dedicated::PlayerGuids)) return false;
|
if (clientNum < 0 || clientNum >= ARRAYSIZE(Dedicated::PlayerGuids)) return false;
|
||||||
|
|
||||||
std::lock_guard<std::recursive_mutex> _(Friends::Mutex);
|
std::lock_guard<std::recursive_mutex> _(Friends::Mutex);
|
||||||
SteamID guid = Dedicated::PlayerGuids[clientNum];
|
SteamID guid = Dedicated::PlayerGuids[clientNum][0];
|
||||||
|
|
||||||
for (auto entry : Friends::FriendsList)
|
for (auto entry : Friends::FriendsList)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user