From 3a59baab2c899a749d3d6d7f1d0906f75a8ad53d Mon Sep 17 00:00:00 2001 From: thordin Date: Sun, 13 Sep 2015 13:49:31 -0700 Subject: [PATCH] Added IsFree() edict check to FindEntityByNetClass. --- extensions/tf2/extension.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/tf2/extension.cpp b/extensions/tf2/extension.cpp index 71f5279f..76e6c234 100644 --- a/extensions/tf2/extension.cpp +++ b/extensions/tf2/extension.cpp @@ -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; }