From: havoc Date: Tue, 1 Jul 2003 18:32:11 +0000 (+0000) Subject: extremely minor optimization to linking edicts into area grid X-Git-Tag: xonotic-v0.1.0preview~6578 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=33e19a8f39b9d13aec3b55f504ce482dba311e27;p=xonotic%2Fdarkplaces.git extremely minor optimization to linking edicts into area grid git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3118 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/world.c b/world.c index d30f9f34..7af2672b 100644 --- a/world.c +++ b/world.c @@ -298,9 +298,9 @@ void SV_LinkEdict_AreaGrid(edict_t *ent) { // wow, something outside the grid, store it as such if (ent->v->solid == SOLID_TRIGGER) - InsertLinkBefore (&ent->e->areagrid[0], &sv_areagrid_outside.trigger_edicts, NUM_FOR_EDICT(ent)); + InsertLinkBefore (&ent->e->areagrid[0], &sv_areagrid_outside.trigger_edicts, entitynumber); else - InsertLinkBefore (&ent->e->areagrid[0], &sv_areagrid_outside.solid_edicts, NUM_FOR_EDICT(ent)); + InsertLinkBefore (&ent->e->areagrid[0], &sv_areagrid_outside.solid_edicts, entitynumber); return; } @@ -311,9 +311,9 @@ void SV_LinkEdict_AreaGrid(edict_t *ent) for (igrid[0] = igridmins[0];igrid[0] < igridmaxs[0];igrid[0]++, grid++, gridnum++) { if (ent->v->solid == SOLID_TRIGGER) - InsertLinkBefore (&ent->e->areagrid[gridnum], &grid->trigger_edicts, NUM_FOR_EDICT(ent)); + InsertLinkBefore (&ent->e->areagrid[gridnum], &grid->trigger_edicts, entitynumber); else - InsertLinkBefore (&ent->e->areagrid[gridnum], &grid->solid_edicts, NUM_FOR_EDICT(ent)); + InsertLinkBefore (&ent->e->areagrid[gridnum], &grid->solid_edicts, entitynumber); } } }