fix more bullshit
This commit is contained in:
@@ -133,13 +133,16 @@ public class PlayerDataFactory
|
|||||||
// wait until chara is not drawing and present so nothing spontaneously explodes
|
// wait until chara is not drawing and present so nothing spontaneously explodes
|
||||||
await _dalamudUtil.WaitWhileCharacterIsDrawing(_logger, playerRelatedObject, Guid.NewGuid(), 30000, ct: token).ConfigureAwait(false);
|
await _dalamudUtil.WaitWhileCharacterIsDrawing(_logger, playerRelatedObject, Guid.NewGuid(), 30000, ct: token).ConfigureAwait(false);
|
||||||
int totalWaitTime = 10000;
|
int totalWaitTime = 10000;
|
||||||
while (!await _dalamudUtil.IsObjectPresentAsync(await _dalamudUtil.CreateGameObjectAsync(charaPointer).ConfigureAwait(false)).ConfigureAwait(false) && totalWaitTime > 0)
|
while (!await _dalamudUtil.IsObjectPresentAsync(await _dalamudUtil.CreateGameObjectAsync(playerRelatedObject.Address).ConfigureAwait(false)).ConfigureAwait(false) && totalWaitTime > 0)
|
||||||
{
|
{
|
||||||
_logger.LogTrace("Character is null but it shouldn't be, waiting");
|
_logger.LogTrace("Character is null but it shouldn't be, waiting");
|
||||||
await Task.Delay(50, token).ConfigureAwait(false);
|
await Task.Delay(50, token).ConfigureAwait(false);
|
||||||
totalWaitTime -= 50;
|
totalWaitTime -= 50;
|
||||||
}
|
}
|
||||||
var boneIndices = await _dalamudUtil.RunOnFrameworkThread(() => _modelAnalyzer.GetSkeletonBoneIndices(charaPointer)).ConfigureAwait(false);
|
Dictionary<string, List<ushort>>? boneIndices =
|
||||||
|
objectKind != ObjectKind.Player
|
||||||
|
? null
|
||||||
|
: await _dalamudUtil.RunOnFrameworkThread(() => _modelAnalyzer.GetSkeletonBoneIndices(playerRelatedObject.Address)).ConfigureAwait(false);
|
||||||
|
|
||||||
DateTime start = DateTime.UtcNow;
|
DateTime start = DateTime.UtcNow;
|
||||||
|
|
||||||
@@ -243,7 +246,7 @@ public class PlayerDataFactory
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogWarning(e, "Failed to verify player animations, continuing");
|
_logger.LogWarning(e, "Failed to verify player animations, continuing without further verification");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,11 +46,9 @@ public sealed class XivDataAnalyzer
|
|||||||
outputIndices[skeletonName] = new();
|
outputIndices[skeletonName] = new();
|
||||||
for (ushort boneIdx = 0; boneIdx < curBones; boneIdx++)
|
for (ushort boneIdx = 0; boneIdx < curBones; boneIdx++)
|
||||||
{
|
{
|
||||||
|
|
||||||
var boneName = handle->HavokSkeleton->Bones[boneIdx].Name.String;
|
var boneName = handle->HavokSkeleton->Bones[boneIdx].Name.String;
|
||||||
if (boneName == null) continue;
|
if (boneName == null) continue;
|
||||||
outputIndices[skeletonName].Add(boneIdx);
|
outputIndices[skeletonName].Add((ushort)(boneIdx + 1));
|
||||||
|
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user