1.1 --- a/core/PlayerManager.cpp Wed Sep 12 07:22:38 2007 +0000
1.2 +++ b/core/PlayerManager.cpp Wed Sep 12 22:46:00 2007 +0000
1.3 @@ -48,6 +48,7 @@
1.4 bool g_OnMapStarted = false;
1.5 IForward *PreAdminCheck = NULL;
1.6 IForward *PostAdminCheck = NULL;
1.7 +const unsigned int *g_NumPlayersToAuth = NULL;
1.8
1.9 SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, edict_t *, const char *, const char *, char *, int);
1.10 SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, edict_t *, const char *);
1.11 @@ -86,6 +87,8 @@
1.12
1.13 PlayerManager::~PlayerManager()
1.14 {
1.15 + g_NumPlayersToAuth = NULL;
1.16 +
1.17 delete [] m_AuthQueue;
1.18 delete [] m_UserIdLookUp;
1.19 }
1.20 @@ -187,6 +190,8 @@
1.21 m_FirstPass = false;
1.22
1.23 memset(m_AuthQueue, 0, sizeof(unsigned int) * (m_maxClients + 1));
1.24 +
1.25 + g_NumPlayersToAuth = &m_AuthQueue[0];
1.26 }
1.27 m_onActivate->Execute(NULL);
1.28 m_onActivate2->Execute(NULL);
1.29 @@ -318,7 +323,6 @@
1.30 m_AuthQueue[0] -= removed;
1.31 } else {
1.32 m_AuthQueue[0] = 0;
1.33 - g_SourceMod.SetAuthChecking(false);
1.34 }
1.35 }
1.36 }
1.37 @@ -351,7 +355,6 @@
1.38 if (!m_Players[client].IsAuthorized())
1.39 {
1.40 m_AuthQueue[++m_AuthQueue[0]] = client;
1.41 - g_SourceMod.SetAuthChecking(true);
1.42 }
1.43 } else {
1.44 RETURN_META_VALUE(MRES_SUPERCEDE, false);