Edicts are instances of the gentity_s structure. Every instance of any class that inherits from the Entity class (including the Entity class itself) eats up edicts. This is a fragment from FAKK2's source:
When an animated explosion goes off, it creates edicts for each chunk of flying debris. Also, other animated things like snow or rain will be hard on the edict count. Basiically, anything that creates its own objects uses edicts.
jv_map wrote:No. Smoke, rain etc are client-side particle effects (tempmodels). Only their emitter uses an edict.
Jv's perfectly right.
A translation to human speak of the bit of FAKK's code above: basically, the Entity class is just an object-wrapper around the basic Q3 entity type (struct gentity_s gentity_t).
typedef struct gentity_s gentity_t;
struct gentity_s
{
entityState_t s; // communicated by server to clients
struct playerState_s *client;
qboolean inuse;
qboolean linked; // qfalse if not in any good cluster
int linkcount;
int svFlags; // SVF_NOCLIENT, SVF_BROADCAST, etc
qboolean bmodel; // if false, assume an explicit mins / maxs bounding box
// only set by gi.SetBrushModel
vec3_t mins, maxs;
int contents; // CONTENTS_TRIGGER, CONTENTS_SOLID, CONTENTS_BODY, etc
// a non-solid entity should set to 0
vec3_t absmin, absmax; // derived from mins/maxs and origin + rotation
float radius; // radius of object
vec3_t centroid; // centroid, to be used with radius
int areanum; // areanum needs to be seen inside the game as well
// currentOrigin will be used for all collision detection and world linking.
// it will not necessarily be the same as the trajectory evaluation for the current
// time, because each entity must be moved one at a time after time is advanced
// to avoid simultanious collision issues
vec3_t currentOrigin;
vec3_t currentAngles;
// when a trace call is made and passEntityNum != ENTITYNUM_NONE,
// an ent will be excluded from testing if:
// ent->s.number == passEntityNum (don't interact with self)
// ent->s.ownerNum = passEntityNum (don't interact with your own missiles)
// entity[ent->s.ownerNum].ownerNum = passEntityNum (don't interact with other missiles from owner)
int ownerNum;
//gentity_t *owner; // objects never interact with their owners, to
// prevent player missiles from immediately
// colliding with their owner
solid_t solid;
// the game dll can add anything it wants after
// this point in the structure
};
It's just a structure of all the basic data an entity needs to exist.