Fix SetAuthIdCookie's IsAuthIdConnect function's issues with mixed auth id types.

This commit is contained in:
Nicholas Hastings
2014-11-15 09:34:49 -05:00
parent f42a1fe0e4
commit ea86eee74e
3 changed files with 36 additions and 29 deletions
-28
View File
@@ -356,34 +356,6 @@ const char *GetPlayerCompatAuthId(IGamePlayer *pPlayer)
return steamId ? steamId : pPlayer->GetAuthString();
}
size_t IsAuthIdConnected(char *authID)
{
IGamePlayer *player;
const char *authString;
for (int playerIndex = playerhelpers->GetMaxClients()+1; --playerIndex > 0;)
{
player = playerhelpers->GetGamePlayer(playerIndex);
if (player == NULL || !player->IsConnected())
{
continue;
}
authString = GetPlayerCompatAuthId(player);
if (authString == NULL || authString[0] == '\0')
{
continue;
}
if (strcmp(authString, authID) == 0)
{
return playerIndex;
}
}
return 0;
}
void ClientPrefs::CatchLateLoadClients()
{
IGamePlayer *pPlayer;