Added IsFree() edict check to FindEntityByNetClass.
This commit is contained in:
parent
fc947c68f7
commit
3a59baab2c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user