Track spectators for each SourceTV instance seperately
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user