Skip to content

Commit

Permalink
Use pakguid type to determine field size
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauler125 committed Dec 3, 2024
1 parent 2dbeb36 commit aedefbe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/assets/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,19 @@ void Assets::AddModelAsset_v9(CPakFile* const pak, const char* const assetPath,

for (uint32_t j = 0; j < pHdr->animRigCount; ++j)
{
guids.emplace_back(animRigsChunk.GetPointer(sizeof(uint64_t) * j));
guids.emplace_back(animRigsChunk.GetPointer(sizeof(PakGuid_t) * j));
}
}

CPakDataChunk sequencesChunk;
if (AnimSeq_AddSequenceRefs(&sequencesChunk, pak, &pHdr->sequenceCount, mapEntry))
{
pHdr->pSequences = sequencesChunk.GetPointer();

pak->AddPointer(hdrChunk.GetPointer(offsetof(ModelAssetHeader_t, pSequences)));

for (uint32_t i = 0; i < pHdr->sequenceCount; ++i)
{
guids.emplace_back(sequencesChunk.GetPointer(8 * i));
guids.emplace_back(sequencesChunk.GetPointer(sizeof(PakGuid_t) * i));
}
}

Expand Down

0 comments on commit aedefbe

Please sign in to comment.