From 0c29170bba73610a1855a54b5544709fe856e924 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 9aad0a66..de6e5d91 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];