2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-23 05:12:05 +00:00

Moved the re-ordering of indices to the BSP creator instead of the BSP asset linker.

This commit is contained in:
LJW-Dev
2025-11-04 18:32:29 +08:00
parent 0f70c29532
commit c9aa8e373b
3 changed files with 10 additions and 17 deletions

View File

@@ -158,9 +158,12 @@ namespace
vertexVec.insert(vertexVec.end(), tempVertices.begin(), tempVertices.end());
// T6 uses unsigned shorts as their index type so we have to loop and convert them from an unsigned int
for (size_t idx = 0; idx < outIndices.size(); idx++)
for (size_t idx = 0; idx < outIndices.size(); idx += 3)
{
indexVec.emplace_back(static_cast<uint16_t>(outIndices[idx]));
// BO2's index ordering is opposite to the FBX, so its converted here
indexVec.emplace_back(static_cast<uint16_t>(outIndices[idx + 2]));
indexVec.emplace_back(static_cast<uint16_t>(outIndices[idx + 1]));
indexVec.emplace_back(static_cast<uint16_t>(outIndices[idx + 0]));
}
surfaceVec.emplace_back(surface);