Track spectators for each SourceTV instance seperately

This commit is contained in:
Peace-Maker
2016-03-06 12:50:07 +01:00
parent 10910e8b8e
commit 61f59c5b9b
6 changed files with 54 additions and 49 deletions
-25
View File
@@ -42,28 +42,3 @@ void HLTVClientWrapper::Kick(const char *reason)
// Go this route due to different IClient::Disconnect signatures in games..
m_Client->GetServer()->DisconnectClient(m_Client, reason);
}
HLTVClientWrapper *HLTVClientManager::GetClient(int index)
{
// Grow the vector with null pointers
// There might have been clients with lower indexes before we were loaded.
if (m_Clients.length() < (size_t)index)
{
int start = m_Clients.length();
m_Clients.resize(index);
for (int i = start; i < index; i++)
{
m_Clients[i] = nullptr;
}
}
if (!m_Clients[index - 1])
{
m_Clients[index - 1] = new HLTVClientWrapper();
}
return m_Clients[index - 1];
}
// FIXME: ClientManager instance for each hltvserver instance in csgo!
HLTVClientManager g_HLTVClientManager;