made new playerhelpers api backwards compatible; added note about server activation and maxclients

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401492
This commit is contained in:
David Anderson 2007-09-26 13:14:41 +00:00
parent fda5ac1738
commit 0bd7df8667
2 changed files with 6 additions and 1 deletions

View File

@ -198,9 +198,12 @@ void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int cl
List<IClientListener *>::iterator iter; List<IClientListener *>::iterator iter;
for (iter = m_hooks.begin; iter != m_hooks.end(); iter++) for (iter = m_hooks.begin; iter != m_hooks.end(); iter++)
{
if ((*iter)->GetClientListenerVersion() >= 5)
{ {
(*iter)->OnServerActivated(clientMax); (*iter)->OnServerActivated(clientMax);
} }
}
g_OnMapStarted = true; g_OnMapStarted = true;

View File

@ -277,6 +277,8 @@ namespace SourceMod
/** /**
* @brief Returns the maximum number of clients. * @brief Returns the maximum number of clients.
* *
* Note: this will not work until the server is activated.
*
* @return Maximum number of clients. * @return Maximum number of clients.
*/ */
virtual int GetMaxClients() =0; virtual int GetMaxClients() =0;