ent_getdecal(ENTITY*,var mesh,var num);

Returns a decal attached to the given mesh of the given entity.

Parameters:

ENTITY* - Model or terrain entity pointer, or NULL for the level.
mesh - Number of the terrain chunk, or the block mesh number of the level, beginning with 0.
num - Number of the decal, starting with 1. If less decals are attached than the number given, NULL is returned.

Returns

PARTICLE* pointer to the decal with the given number, or NULL.

Speed:

Medium

Example (lite-C):

function count_decals(ENTITY* ent)
{
  var i = 1;
  while(ent_getdecal(ent,0,i)) i++;
  return i-1; // number of decals of that entity
}

See also:

PARTICLE, ent_status, ent_decal

► latest version online