From abb8d8447f81e20dd66b16b580c9081012639be3 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Fri, 19 Dec 2014 18:27:18 -0500 Subject: [PATCH 1/2] Move bot auth to after connect to fix old too-early-authid bug now causing crash (r=VoiDeD). --- core/PlayerManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index 0978eb90..c9b6e8ed 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -536,7 +536,7 @@ bool PlayerManager::OnClientConnect(edict_t *pEntity, const char *pszName, const if (res) { - if (!pPlayer->IsAuthorized()) + if (!pPlayer->IsAuthorized() && !pPlayer->IsFakeClient()) { m_AuthQueue[++m_AuthQueue[0]] = client; } @@ -622,8 +622,6 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername char error[255]; pPlayer->m_bFakeClient = true; - pPlayer->UpdateAuthIds(); - pPlayer->Authorize(); /* * While we're already filtered to just bots, we'll do other checks to @@ -710,6 +708,8 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername cell_t res; m_clconnect_post->PushCell(client); m_clconnect_post->Execute(&res, NULL); + + pPlayer->Authorize(); const char *steamId = pPlayer->GetSteam2Id(); From 7fddf5abf4d5f7e15a0e285f2fb2c23cac191e2b Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sat, 20 Dec 2014 22:55:36 -0500 Subject: [PATCH 2/2] Disable nextmap on Insurgency. --- plugins/nextmap.sp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/nextmap.sp b/plugins/nextmap.sp index 8dd6624a..4408a16e 100644 --- a/plugins/nextmap.sp +++ b/plugins/nextmap.sp @@ -63,7 +63,8 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max || StrEqual(game, "left4dead2", false) || StrEqual(game, "garrysmod", false) || StrEqual(game, "swarm", false) - || StrEqual(game, "dota", false)) + || StrEqual(game, "dota", false) + || GetEngineVersion() == Engine_Insurgency) { strcopy(error, err_max, "Nextmap is incompatible with this game"); return APLRes_SilentFailure;