Skip to content

Commit

Permalink
Remove rmdl buf size alignment from model code
Browse files Browse the repository at this point in the history
CreatePageLump already does this now.
  • Loading branch information
Mauler125 committed Dec 23, 2024
1 parent 234bfb0 commit f17ff4f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/assets/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ void Assets::AddModelAsset_v9(CPakFileBuilder* const pak, const PakGuid_t assetG
streamedVgOffset = UINT64_MAX;

// the last chunk is the actual data chunk that contains the rmdl
const size_t alignedModelDataSize = IALIGN64(studiohdr->length); // todo(amos): should we just let CreateDataChunk align the provided size?
PakPageLump_s dataChunk = pak->CreatePageLump(alignedModelDataSize, SF_CPU, 64, rmdlBuf);
PakPageLump_s dataChunk = pak->CreatePageLump(studiohdr->length, SF_CPU, 64, rmdlBuf);

pHdr->pData = dataChunk.GetPointer();
pak->AddPointer(hdrChunk.GetPointer(offsetof(ModelAssetHeader_t, pData)));
Expand Down

0 comments on commit f17ff4f

Please sign in to comment.