ent_clone(ENTITY*);
ent_cloneskin(ENTITY*);
Creates a unique mesh or skin for the given entity, by internally duplicating
the skins, materials,
and meshes (ent_cloneskin) or the whole
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.
Speed:
Medium
Remarks:
-
The function works only for sprites and models.
- ent_clone increases the nexus and video memory allocated,
depending on the number of vertices and frames of the model.
- ent_clone includes ent_cloneskin.
- Subsequent calls to ent_setskin, ent_setmesh,
ent_mtlset,
or ent_setvertex
affect
only the individual entity.
- The cloned skins, materials, and meshes (and the fact that they
are cloned) are not saved by game_save.
-
Removing cloned entities (ent_remove) is slower than removing normal entities. This can be prevented by adding 8 to preload_mode.
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