mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-15 19:28:48 -05:00
Improve fix of issue #147
This commit is contained in:
@@ -895,6 +895,7 @@ namespace AssetStudio
|
|||||||
{
|
{
|
||||||
Logger.Warning($"Cannot process mesh | PathID: {m_PathID} | Name: \"{m_Name}\"" +
|
Logger.Warning($"Cannot process mesh | PathID: {m_PathID} | Name: \"{m_Name}\"" +
|
||||||
$"\n{ex.Message}");
|
$"\n{ex.Message}");
|
||||||
|
Logger.Debug(ex.StackTrace);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@@ -1247,9 +1248,9 @@ namespace AssetStudio
|
|||||||
//IndexBuffer
|
//IndexBuffer
|
||||||
if (m_CompressedMesh.m_Triangles.m_NumItems > 0)
|
if (m_CompressedMesh.m_Triangles.m_NumItems > 0)
|
||||||
{
|
{
|
||||||
m_IndexBuffer = m_Use16BitIndices
|
m_IndexBuffer = !m_Use16BitIndices && m_CompressedMesh.m_Triangles.m_NumItems / 2 == m_SubMeshes.Sum(x=> x.indexCount)
|
||||||
? Array.ConvertAll(m_CompressedMesh.m_Triangles.UnpackInts(), x => (uint)x)
|
? MemoryMarshal.Cast<byte, uint>(m_CompressedMesh.m_Triangles.m_Data).ToArray() // https://github.com/aelurum/AssetStudioMod/issues/147
|
||||||
: MemoryMarshal.Cast<byte, uint>(m_CompressedMesh.m_Triangles.m_Data).ToArray(); //sus
|
: Array.ConvertAll(m_CompressedMesh.m_Triangles.UnpackInts(), x => (uint)x);
|
||||||
}
|
}
|
||||||
//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