Fix player count in server presence (#322)

This commit is contained in:
Emma Miler 2022-11-06 02:11:40 +01:00 committed by GitHub
parent a0455d177a
commit 44be87347b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -398,8 +398,11 @@ void,, (R2::CBaseClient* self, uint32_t unknownButAlways1, const char* pReason,
g_pServerAuthentication->RemovePlayerAuthData(self); // won't do anything 99% of the time, but just in case
}
g_pServerAuthentication->RemovePlayer(self);
g_pServerLimits->RemovePlayer(self);
if (g_pServerAuthentication->m_RemoteAuthenticationData.count(self->m_Name))
{
g_pServerAuthentication->RemovePlayer(self);
g_pServerLimits->RemovePlayer(self);
}
g_pServerPresence->SetPlayerCount(g_pServerAuthentication->m_PlayerAuthenticationData.size());