Fixed nonzero maxClients startup crash in SDKTools (bug 5010, r=bee).

This commit is contained in:
Nicholas Hastings 2011-07-07 19:51:05 -04:00
parent 5250d819d0
commit 7e87f56699

View File

@ -190,12 +190,15 @@ void CHookManager::OnPluginLoaded(IPlugin *plugin)
PRCH_used = true; PRCH_used = true;
int MaxClients = playerhelpers->GetMaxClients(); if (playerhelpers->IsServerActivated())
for (int i = 1; i <= MaxClients; i++)
{ {
if (playerhelpers->GetGamePlayer(i)->IsInGame()) int MaxClients = playerhelpers->GetMaxClients();
for (int i = 1; i <= MaxClients; i++)
{ {
OnClientPutInServer(i); if (playerhelpers->GetGamePlayer(i)->IsInGame())
{
OnClientPutInServer(i);
}
} }
} }
} }