ent_remove(ENTITY*);
Removes a level, view, or sky entity.
Parameters:
ENTITY* - Pointer to the entity to be
removed.
Speed:
Slow
Remarks:
-
The pointer
of a
removed entity
must not be used anymore, otherwise a crash will be the result. All my and you pointers to that entity are set to NULL in all functions. ent_remove also terminates all other functions that use the removed entity for the my pointer, including all functions called by the entity, unless A7.76 proc_mode is set to PROC_GLOBAL for a particular function.
-
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