ent_type (ENTITY*)

Returns the type of the entity, or the type of the current level.

Parameters:

ENTITY* - entity pointer , or NULL for returning the level map type.

Returns:

0 - No valid type
1 - Polygon based BSP map (A4, A5, A6)
2 - Mesh based ABT map (A7)
3 - Mesh based BSP map (A7)
4 - Terrain
5 - Model
6 - Sprite

Speed:

Fast

Example:

if (ent_type(NULL)==1) {
  max_lights = 8; // limit the lights in old-style levels
} else {
  max_lights = 100;
} 

See also:

ent_skins, ent_frames

► latest version online