| 1793 | } |
| 1794 | |
| 1795 | void 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 | |
| 1817 | void ObjReInitPositionHistory(void) { |
| 1818 | ObjResetPositionHistory(); |
no outgoing calls
no test coverage detected