ent_pvs (var num, var mode);

A7.08 All potentially visible entities of the level are sorted by the BSP or ABT rendering process into two internal lists, one for opaque and one for transparent entities. This function returns a pointer to a certain entity in the opaque or transparent list, thus giving access to all potentially visible entities. A level must be loaded and a frame must have been rendered for this function to work.


num - number of the entity in the list, starting with 1
mode - 0 for opaque and 1 for transparent entities


ENTITY* pointer, or NULL when the end of the list was reached.



Example (lite-C):

function hide_all_transparent_ents()
  int i = 1;
  you = ent_pvs(i,1); // retrieve first transparent entity
  while (you) // repeat until there are no more entities
    set(you,INVISIBLE); // make entity invisible
 	  you = ent_pvs(i,1); // get next entity

See also:

ent_vertices, ent_for_name, ent_next, Render Process

► latest version online