mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-15 19:28:48 -05:00
Fix m_IndexBuffer decompression when m_IndexFormat != 0. Close #147
This might be a game-specific behavior.. but it should be safe to add, in theory
This commit is contained in:
@@ -1238,7 +1238,9 @@ namespace AssetStudio
|
|||||||
//IndexBuffer
|
//IndexBuffer
|
||||||
if (m_CompressedMesh.m_Triangles.m_NumItems > 0)
|
if (m_CompressedMesh.m_Triangles.m_NumItems > 0)
|
||||||
{
|
{
|
||||||
m_IndexBuffer = Array.ConvertAll(m_CompressedMesh.m_Triangles.UnpackInts(), x => (uint)x);
|
m_IndexBuffer = m_Use16BitIndices
|
||||||
|
? Array.ConvertAll(m_CompressedMesh.m_Triangles.UnpackInts(), x => (uint)x)
|
||||||
|
: MemoryMarshal.Cast<byte, uint>(m_CompressedMesh.m_Triangles.m_Data).ToArray(); //sus
|
||||||
}
|
}
|
||||||
//Color
|
//Color
|
||||||
if (m_CompressedMesh.m_Colors?.m_NumItems > 0)
|
if (m_CompressedMesh.m_Colors?.m_NumItems > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user