ent_remove(ENTITY* entity);
Removes a level, view, or sky entity.
Parameters:
entity - Pointer to the entity to be
removed.
Speed:
SlowRemarks:
-
The pointer
of a
removed entity becomes invalid
and must not be used anymore. The ent_remove function terminates all other actions that use the removed entity for the my pointer.
-
After an entity is removed, its file content is still stored in a cache for faster creation of entitities of this type. The cache is emptied when the level is changed.
If this is not desired for some reason, keep the file in the cache by defining an invisible view entity with the same file.
-
Entities can also be removed by the ptr_remove function.
Example:
ent_remove(me); // The 'me' entity is removed
See also:
ent_create,
ent_createlayer,
ent_morph, ent_purge,
ent_preload, ptr_remove
► latest
version online