Add IsFree check to FindEntityByNetClass in SDKTools (PR #330).
This commit is contained in:
parent
ffedae66f4
commit
5694a759ce
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user