From 8d0b5360c22355342173e7931f3f2510e0c1deaf Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 6 Sep 2004 18:59:59 +0000 Subject: [PATCH] Fix for find_ent --- dlls/engine/entity.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dlls/engine/entity.cpp b/dlls/engine/entity.cpp index b26eec49..2d532c4f 100755 --- a/dlls/engine/entity.cpp +++ b/dlls/engine/entity.cpp @@ -1364,11 +1364,6 @@ static cell AMX_NATIVE_CALL find_ent_in_sphere(AMX *amx, cell *params) { int idx = params[1]; - if (!is_ent_valid(idx)) { - EngineError(amx, "Invalid Entity %d", idx); - return 0; - } - edict_t *pEnt = INDEXENT2(idx); cell *cAddr = MF_GetAmxAddr(amx, params[2]); REAL origin[3] = { @@ -1527,7 +1522,7 @@ static cell AMX_NATIVE_CALL find_ent_by_owner(AMX *amx, cell *params) // native int iEnt = params[1]; int oEnt = params[3]; // Check index to start searching at, 0 must be possible for iEnt. - if ((iEnt != 0 && !is_ent_valid(iEnt)) || !is_ent_valid(oEnt)) { + if (!is_ent_valid(oEnt)) { EngineError(amx, "Invalid Entity"); return 0; }