fix up discord rpc
This commit is contained in:
parent
954543228f
commit
2a79fe000e
@ -52,15 +52,17 @@ namespace discord
|
||||
char clean_hostname[0x100] = {0};
|
||||
utils::string::strip(game::Dvar_FindVar("sv_hostname")->current.string,
|
||||
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())
|
||||
{
|
||||
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.partyMax = max_clients;
|
||||
discord_presence.state = clean_hostname;
|
||||
|
Loading…
Reference in New Issue
Block a user