Merge pull request #330 from yedpodtrzitko/1.7-dev

Add IsFree check to FindEntityByNetClass in SDKTools.
This commit is contained in:
Kyle Sanderson 2015-05-04 18:08:51 -07:00
commit 16b7c576d4

View File

@ -46,7 +46,7 @@ static CBaseEntity *FindEntityByNetClass(int start, const char *classname)
for (int i = start; i < maxEntities; i++)
{
edict_t *current = gamehelpers->EdictOfIndex(i);
if (current == NULL)
if (current == NULL || current->IsFree())
continue;
IServerNetworkable *network = current->GetNetworkable();