Skip to content

Commit

Permalink
Merge pull request #407 from Thordin/FindEntityByNetClass
Browse files Browse the repository at this point in the history
Added IsFree() edict check to FindEntityByNetClass
  • Loading branch information
KyleSanderson committed Sep 13, 2015
2 parents fc947c6 + 3a59baa commit 5b3b177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/tf2/extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5b3b177

Please sign in to comment.