Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

nextent

From Quake Wiki

entity nextent(entity start)

Usage[edit]

Gets the next entity in the list of all entities. Passing world will get the very first entity. Can be used to iterate through all entities and update them if find() is not general enough.

Parameters[edit]

  • start
The entity to start from, exclusive.

Return[edit]

The next entity in the list, or world if at the end.

Example[edit]

// This goes through every entity and disables their collision
for (entity it = nextent(world); it; it = nextent(it))
{
    if (it.solid == SOLID_BBOX || it.solid == SOLID_SLIDEBOX)
    {
        it.solid = SOLID_NONE;
        setorigin(it, it.origin); // Relink them
    }
}