]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
extremely minor optimization to linking edicts into area grid
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 1 Jul 2003 18:32:11 +0000 (18:32 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 1 Jul 2003 18:32:11 +0000 (18:32 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3118 d7cf8633-e32d-0410-b094-e92efae38249

world.c

diff --git a/world.c b/world.c
index d30f9f34d076b1ba1dadda5f9a460c27c3bb0379..7af2672b7ebda74d312c04da70d75e5b1925ff8d 100644 (file)
--- 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);
                }
        }
 }