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

Function ObjFreePositionHistory

Descent3/object.cpp:1782–1793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1780}
1781
1782void ObjFreePositionHistory(object *obj) {
1783 int objnum = OBJNUM(obj);
1784
1785 if (Object_map_position_history[objnum] != -1) {
1786 int slot_to_free = Object_map_position_history[objnum];
1787 Object_map_position_history[objnum] = -1;
1788
1789 Object_map_position_free_slots[Num_free_object_position_history] = slot_to_free;
1790 Num_free_object_position_history++;
1791 ASSERT(Num_free_object_position_history <= MAX_OBJECT_POS_HISTORY);
1792 }
1793}
1794
1795void ObjResetPositionHistory(void) {
1796 Num_free_object_position_history = MAX_OBJECT_POS_HISTORY;

Callers 1

ObjFreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected