mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 15:07:22 +01:00
fully ignore garbage skeletons that fail to process properly
This commit is contained in:
parent
74408bba4f
commit
c1f70cd47c
1 changed files with 6 additions and 4 deletions
|
|
@ -34,14 +34,16 @@ public sealed class XivDataAnalyzer
|
|||
if (chara->GetModelType() != CharacterBase.ModelType.Human) return null;
|
||||
var resHandles = chara->Skeleton->SkeletonResourceHandles;
|
||||
int i = 0;
|
||||
Dictionary<string, List<ushort>> outputIndices = new();
|
||||
Dictionary<string, List<ushort>> outputIndices = [];
|
||||
while (*(resHandles + i) != null)
|
||||
{
|
||||
string skeletonName = "unknown";
|
||||
|
||||
try
|
||||
{
|
||||
var handle = *(resHandles + i);
|
||||
var curBones = handle->BoneCount;
|
||||
var skeletonName = handle->ResourceHandle.FileName.ToString();
|
||||
skeletonName = handle->ResourceHandle.FileName.ToString();
|
||||
outputIndices[skeletonName] = new();
|
||||
for (ushort boneIdx = 0; boneIdx < curBones; boneIdx++)
|
||||
{
|
||||
|
|
@ -52,9 +54,9 @@ public sealed class XivDataAnalyzer
|
|||
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogTrace("Could not get bone for {skellyname}:{idx}", skeletonName, boneIdx);
|
||||
_logger.LogWarning(ex, "Could procss skeleton {skl}", skeletonName);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue