Fix discord player count
This commit is contained in:
parent
493a2df20e
commit
c8f6fed174
@ -101,7 +101,16 @@ namespace discord
|
|||||||
discord_presence.partyPrivacy = DISCORD_PARTY_PUBLIC;
|
discord_presence.partyPrivacy = DISCORD_PARTY_PUBLIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
discord_presence.partySize = 1; //*reinterpret_cast<int*>(0x1429864C4);
|
const auto client_state = *game::mp::client_state;
|
||||||
|
if (client_state != nullptr)
|
||||||
|
{
|
||||||
|
discord_presence.partySize = client_state->num_players;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
discord_presence.partySize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
discord_presence.partyMax = max_clients;
|
discord_presence.partyMax = max_clients;
|
||||||
discord_presence.state = clean_hostname;
|
discord_presence.state = clean_hostname;
|
||||||
discord_presence.largeImageKey = map;
|
discord_presence.largeImageKey = map;
|
||||||
|
@ -1448,6 +1448,13 @@ namespace game
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// made up
|
||||||
|
struct client_state_t
|
||||||
|
{
|
||||||
|
char __pad0[0x4A5C];
|
||||||
|
int num_players;
|
||||||
|
};
|
||||||
|
|
||||||
enum PlayerHandIndex
|
enum PlayerHandIndex
|
||||||
{
|
{
|
||||||
WEAPON_HAND_DEFAULT = 0x0,
|
WEAPON_HAND_DEFAULT = 0x0,
|
||||||
|
@ -257,6 +257,8 @@ namespace game
|
|||||||
WEAK symbol<int> sv_serverId_value{0x0, 0x0};
|
WEAK symbol<int> sv_serverId_value{0x0, 0x0};
|
||||||
|
|
||||||
WEAK symbol<bool> virtualLobby_loaded{0x0, 0x2E6EC9D};
|
WEAK symbol<bool> virtualLobby_loaded{0x0, 0x2E6EC9D};
|
||||||
|
|
||||||
|
WEAK symbol<client_state_t*> client_state{0x0, 0x2EC84F0};
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace sp
|
namespace sp
|
||||||
|
Loading…
Reference in New Issue
Block a user