Fixed maxClients not being updated correctly in some cases/areas (bug 4986, r=fyren).
This commit is contained in:
parent
c1926c6e25
commit
75c315ad8a
@ -232,13 +232,13 @@ ConfigResult PlayerManager::OnSourceModConfigChanged(const char *key,
|
|||||||
|
|
||||||
void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
||||||
{
|
{
|
||||||
|
// clientMax will not necessarily be correct here (such as on late SourceTV enable)
|
||||||
|
m_maxClients = gpGlobals->maxClients;
|
||||||
|
|
||||||
if (!m_FirstPass)
|
if (!m_FirstPass)
|
||||||
{
|
{
|
||||||
/* Initialize all players */
|
/* Initialize all players */
|
||||||
|
|
||||||
// clientMax will not necessarily be correct here (such as on late SourceTV enable)
|
|
||||||
m_maxClients = gpGlobals->maxClients;
|
|
||||||
|
|
||||||
m_PlayerCount = 0;
|
m_PlayerCount = 0;
|
||||||
m_Players = new CPlayer[ABSOLUTE_PLAYER_LIMIT + 1];
|
m_Players = new CPlayer[ABSOLUTE_PLAYER_LIMIT + 1];
|
||||||
m_AuthQueue = new unsigned int[ABSOLUTE_PLAYER_LIMIT + 1];
|
m_AuthQueue = new unsigned int[ABSOLUTE_PLAYER_LIMIT + 1];
|
||||||
@ -248,9 +248,9 @@ void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int cl
|
|||||||
|
|
||||||
g_NumPlayersToAuth = &m_AuthQueue[0];
|
g_NumPlayersToAuth = &m_AuthQueue[0];
|
||||||
|
|
||||||
g_PluginSys.SyncMaxClients(clientMax);
|
g_PluginSys.SyncMaxClients(m_maxClients);
|
||||||
}
|
}
|
||||||
g_Extensions.CallOnCoreMapStart(pEdictList, edictCount, clientMax);
|
g_Extensions.CallOnCoreMapStart(pEdictList, edictCount, m_maxClients);
|
||||||
m_onActivate->Execute(NULL);
|
m_onActivate->Execute(NULL);
|
||||||
m_onActivate2->Execute(NULL);
|
m_onActivate2->Execute(NULL);
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int cl
|
|||||||
{
|
{
|
||||||
if ((*iter)->GetClientListenerVersion() >= 5)
|
if ((*iter)->GetClientListenerVersion() >= 5)
|
||||||
{
|
{
|
||||||
(*iter)->OnServerActivated(clientMax);
|
(*iter)->OnServerActivated(m_maxClients);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user