From 64cdec7e5861924eb9aff7df36e419884e975c44 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 5 May 2013 04:04:34 +0000 Subject: [PATCH] VM_CL_findradius now uses World_EntitiesInBox as it should git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11946 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=770b47df3531baa6b270871b7a0174ccfabacd31 --- clvm_cmds.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/clvm_cmds.c b/clvm_cmds.c index 04d03a9b..6ca2749c 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -455,22 +455,6 @@ static void VM_CL_precache_model (prvm_prog_t *prog) VM_Warning(prog, "VM_CL_precache_model: model \"%s\" not found\n", name); } -static int CSQC_EntitiesInBox (prvm_prog_t *prog, vec3_t mins, vec3_t maxs, int maxlist, prvm_edict_t **list) -{ - prvm_edict_t *ent; - int i, k; - - ent = PRVM_NEXT_EDICT(prog->edicts); - for(k=0,i=1; inum_edicts ;i++, ent = PRVM_NEXT_EDICT(ent)) - { - if (ent->priv.required->free) - continue; - if(BoxesOverlap(mins, maxs, PRVM_clientedictvector(ent, absmin), PRVM_clientedictvector(ent, absmax))) - list[k++] = ent; - } - return k; -} - // #22 entity(vector org, float rad) findradius static void VM_CL_findradius (prvm_prog_t *prog) { @@ -502,7 +486,7 @@ static void VM_CL_findradius (prvm_prog_t *prog) maxs[0] = org[0] + (radius + 1); maxs[1] = org[1] + (radius + 1); maxs[2] = org[2] + (radius + 1); - numtouchedicts = CSQC_EntitiesInBox(prog, mins, maxs, MAX_EDICTS, touchedicts); + numtouchedicts = World_EntitiesInBox(&cl.world, mins, maxs, MAX_EDICTS, touchedicts); if (numtouchedicts > MAX_EDICTS) { // this never happens //[515]: for what then ? -- 2.39.2