fix up discord rpc
This commit is contained in:
parent
a5e7d5a0f6
commit
2c6ff615ef
@ -52,15 +52,17 @@ namespace discord
|
|||||||
char clean_hostname[0x100] = {0};
|
char clean_hostname[0x100] = {0};
|
||||||
utils::string::strip(game::Dvar_FindVar("sv_hostname")->current.string,
|
utils::string::strip(game::Dvar_FindVar("sv_hostname")->current.string,
|
||||||
clean_hostname, sizeof(clean_hostname));
|
clean_hostname, sizeof(clean_hostname));
|
||||||
auto max_clients = game::Dvar_FindVar("sv_maxclients")->current.integer;
|
auto max_clients = party::server_client_count();
|
||||||
|
auto clients = party::get_client_count();
|
||||||
|
|
||||||
|
// When true, we are in Private Match
|
||||||
if (game::SV_Loaded())
|
if (game::SV_Loaded())
|
||||||
{
|
{
|
||||||
strcpy_s(clean_hostname, "Private Match");
|
strcpy_s(clean_hostname, "Private Match");
|
||||||
max_clients = party::server_client_count();
|
max_clients = game::Dvar_FindVar("sv_maxclients")->current.integer;
|
||||||
|
clients = *reinterpret_cast<int*>(0x14621BE00);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto clients = *reinterpret_cast<int*>(0x14621BE00);
|
|
||||||
discord_presence.partySize = clients;
|
discord_presence.partySize = clients;
|
||||||
discord_presence.partyMax = max_clients;
|
discord_presence.partyMax = max_clients;
|
||||||
discord_presence.state = clean_hostname;
|
discord_presence.state = clean_hostname;
|
||||||
|
Loading…
Reference in New Issue
Block a user