void MainObjectArrayPtr::MainObjectArray::Set(ArrayIndex p_Index, MainObjectEntry p_Entry) { ArrayIndex Block; ArrayIndex Element; if (p_Index >= m_MainObjectCount) return; // can't store off the end Block = p_Index / MainObjectEntriesPerBlock; Element = p_Index % MainObjectEntriesPerBlock; m_BlockPtr[Block]->Set(Element, p_Entry); if ((p_Entry == NoObject) && (p_Index < m_CurrentLowestFreeObject)) m_CurrentLowestFreeObject = p_Index; return; }