2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-06-06 08:42:35 +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
committed by Jan Laupetin
parent 80fd8340fb
commit 2f07a70448
3 changed files with 10 additions and 17 deletions
+5 -2
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);