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

Function ObjResetPositionHistory

Descent3/object.cpp:1795–1815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1793}
1794
1795void ObjResetPositionHistory(void) {
1796 Num_free_object_position_history = MAX_OBJECT_POS_HISTORY;
1797 Object_position_head = 0;
1798
1799 int i;
1800
1801 for (i = 0; i < MAX_OBJECTS; i++) {
1802 Object_map_position_history[i] = -1;
1803
1804 if (i < MAX_OBJECT_POS_HISTORY) {
1805 // this array is guaranteed smaller than Objects[]
1806 // so instead of looping through an array again just for
1807 // this, I'll stick it in this loop.
1808 Object_map_position_free_slots[i] = i;
1809 }
1810 }
1811
1812 for (i = 0; i < MAX_POSITION_HISTORY; i++) {
1813 Last_position_history_update[i] = 0 - (0.1f * i);
1814 }
1815}
1816
1817void ObjReInitPositionHistory(void) {
1818 ObjResetPositionHistory();

Callers 2

ResetObjectListFunction · 0.85
ObjReInitPositionHistoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected