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:

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