ent_clone(ENTITY*) : ENTITY*

ent_cloneskin(ENTITY*) : ENTITY*

Creates a unique mesh or skin for the given entity, by internally duplicating the skins and materials (ent_cloneskin) or also the meshes and the vertex animation (ent_clone). After calling this function, the skins, skin materials, and (in case of ent_clone) the vertices can be individually modified without affecting other entities that use the same model file.

Parameters:

ENTITY* - entity pointer.

Returns:

ENTITY*, or NULL when the cloning failed.

Speed:

Medium

Remarks:

Example:

...
ent_cloneskin(me);
ent_setskin(me,myNewBmap,1);
ent_setmesh(me,myNewMesh,0,0);

See also:

ent_morph, ent_morphskin, ent_setskin, ent_setmesh, ent_mtlset, ent_setvertex, ent_reload

► latest version online