level_mark();
level_free();
Partially clears the nexus, i.e. the level cache that holds entity files. level_mark() marks
a cache position and level_free() removes all afterwards
loaded files
and memory allocated with sys_nxalloc
from the cache. This instruction can be used
for temporarily loading entities without consuming nexus memory.
Parameters:
name - name of level, model or terrain file.
Remarks:
- The level cache will be completely cleared when a new level is
loaded.
- The size of the cache depends on the -nx command line option.
- No entity must use a file that was removed from the cache.
All entities that were created after level_mark()
must be removed before level_free().
Speed:
Slow
Example:
level_mark(); // mark a cache position
you = ent_create("test.mdl",vector(0,0,0),NULL);
...
ptr_remove(you);
level_free(); // remove test.mdl from the cache
See Also:
level_load, nexus
► latest
version online