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.
ENTITY* - entity pointer.
ENTITY*, or NULL when the cloning failed.
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,
only the individual entity.
- The cloned skins, materials, and meshes (and the fact that they
are cloned) are not saved by game_save.
Removing a cloned entity (ent_remove) removes the cloned mesh and skin, and is thus slower than removing normal entities. This can be prevented with a preload_mode setting.
- A cloned entity must not be cloned a second time or ent_morphed, otherwise its cloned mesh and skin are 'orphaned' and not released from memory.
ent_setskin, ent_setmesh, ent_mtlset,