From d7fb6b289232a51090723961b67ee58f29de07fe Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Wed, 25 May 2011 08:31:12 -0400 Subject: [PATCH] Fixed invalid client errors from late-load of SourceTV (bug 4881, r=fyren). --- core/PlayerManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index 040944a0..b5a1be02 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -235,7 +235,10 @@ void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int cl if (!m_FirstPass) { /* Initialize all players */ - m_maxClients = clientMax; + + // clientMax will not necessarily be correct here (such as on late SourceTV enable) + m_maxClients = gpGlobals->maxClients; + m_PlayerCount = 0; m_Players = new CPlayer[ABSOLUTE_PLAYER_LIMIT + 1]; m_AuthQueue = new unsigned int[ABSOLUTE_PLAYER_LIMIT + 1];