Added IsFree() edict check to FindEntityByNetClass.

This commit is contained in:
thordin 2015-09-13 13:49:31 -07:00
parent fc947c68f7
commit 3a59baab2c

View File

@ -414,7 +414,7 @@ int FindEntityByNetClass(int start, const char *classname)
for (int i = ((start != -1) ? start : 0); i < gpGlobals->maxEntities; i++)
{
current = engine->PEntityOfEntIndex(i);
if (current == NULL)
if (current == NULL || current->IsFree())
{
continue;
}