| 805 | } |
| 806 | |
| 807 | bool CSnapshotBuilder::AddExtendedItemType(int Index) |
| 808 | { |
| 809 | dbg_assert(m_Building, "Snapshot builder is not building snapshot. Call `AddExtendedItemType` between `Init` and `Finish`."); |
| 810 | dbg_assert(0 <= Index && Index < m_NumExtendedItemTypes, "Index out of range: %d", Index); |
| 811 | |
| 812 | int *pUuidItem = static_cast<int *>(NewItem(0, GetTypeFromIndex(Index), sizeof(CUuid))); // NETOBJTYPE_EX |
| 813 | if(pUuidItem == nullptr) |
| 814 | { |
| 815 | return false; |
| 816 | } |
| 817 | |
| 818 | const int TypeId = m_aExtendedItemTypes[Index]; |
| 819 | const CUuid Uuid = g_UuidManager.GetUuid(TypeId); |
| 820 | for(size_t i = 0; i < sizeof(CUuid) / sizeof(int32_t); i++) |
| 821 | { |
| 822 | pUuidItem[i] = bytes_be_to_uint(&Uuid.m_aData[i * sizeof(int32_t)]); |
| 823 | } |
| 824 | return true; |
| 825 | } |
| 826 | |
| 827 | int CSnapshotBuilder::GetExtendedItemTypeIndex(int TypeId) |
| 828 | { |
nothing calls this directly
no test coverage detected