Move bot auth to after connect to fix old too-early-authid bug now causing crash (r=VoiDeD).

This commit is contained in:
Nicholas Hastings 2014-12-19 18:27:18 -05:00
parent f9cdc421c3
commit 1575ddb3f3

View File

@ -536,7 +536,7 @@ bool PlayerManager::OnClientConnect(edict_t *pEntity, const char *pszName, const
if (res) if (res)
{ {
if (!pPlayer->IsAuthorized()) if (!pPlayer->IsAuthorized() && !pPlayer->IsFakeClient())
{ {
m_AuthQueue[++m_AuthQueue[0]] = client; m_AuthQueue[++m_AuthQueue[0]] = client;
} }
@ -622,8 +622,6 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
char error[255]; char error[255];
pPlayer->m_bFakeClient = true; pPlayer->m_bFakeClient = true;
pPlayer->UpdateAuthIds();
pPlayer->Authorize();
/* /*
* While we're already filtered to just bots, we'll do other checks to * While we're already filtered to just bots, we'll do other checks to
@ -711,6 +709,8 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
m_clconnect_post->PushCell(client); m_clconnect_post->PushCell(client);
m_clconnect_post->Execute(&res, NULL); m_clconnect_post->Execute(&res, NULL);
pPlayer->Authorize();
const char *steamId = pPlayer->GetSteam2Id(); const char *steamId = pPlayer->GetSteam2Id();
/* Now do authorization */ /* Now do authorization */