MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ObjFree

Function ObjFree

Descent3/object.cpp:1642–1651  ·  view source on GitHub ↗

frees up an object. Generally, ObjDelete() should be called to get rid of an object. This function deallocates the object entry after the object has been unlinked

Source from the content-addressed store, hash-verified

1640// rid of an object. This function deallocates the object entry after
1641// the object has been unlinked
1642void ObjFree(int objnum) {
1643 ObjFreePositionHistory(&Objects[objnum]);
1644
1645 free_obj_list[--Num_objects] = objnum;
1646 ASSERT(Num_objects >= 0);
1647
1648 if (objnum == Highest_object_index)
1649 while (Objects[--Highest_object_index].type == OBJ_NONE)
1650 ;
1651}
1652
1653void ObjSetAABB(object *obj) {
1654 vector object_rad;

Callers 2

ObjCreateFunction · 0.85
ObjDeleteFunction · 0.85

Calls 1

ObjFreePositionHistoryFunction · 0.85

Tested by

no test coverage detected