Fix for find_ent

This commit is contained in:
David Anderson 2004-09-06 18:59:59 +00:00
parent 44c5265757
commit 8d0b5360c2

View File

@ -1364,11 +1364,6 @@ static cell AMX_NATIVE_CALL find_ent_in_sphere(AMX *amx, cell *params)
{ {
int idx = params[1]; int idx = params[1];
if (!is_ent_valid(idx)) {
EngineError(amx, "Invalid Entity %d", idx);
return 0;
}
edict_t *pEnt = INDEXENT2(idx); edict_t *pEnt = INDEXENT2(idx);
cell *cAddr = MF_GetAmxAddr(amx, params[2]); cell *cAddr = MF_GetAmxAddr(amx, params[2]);
REAL origin[3] = { 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 iEnt = params[1];
int oEnt = params[3]; int oEnt = params[3];
// Check index to start searching at, 0 must be possible for iEnt. // 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"); EngineError(amx, "Invalid Entity");
return 0; return 0;
} }