Completed the play-seq animation command for characters

This commit is contained in:
2025-11-18 00:40:43 -05:00
parent 29612d226d
commit 383ed25453
8 changed files with 55 additions and 10 deletions

View File

@@ -53,6 +53,23 @@ void UlxScriptedAnimations::AddAnimation(
Animations.Insert(Result, 0);
}
double UlxScriptedAnimations::CalculateTimeLeft(UObject *WorldContextObject, int64 AnimationID)
{
double max = 0.0;
FlxWorldClocks Clocks = UlxScriptedAnimationLibrary::GetAllWorldClocks(WorldContextObject);
for (int i = 0; i < Animations.Num(); i++)
{
const FlxScriptedAnimation &Anim = Animations[i];
if (Anim.AnimationStepID == AnimationID)
{
double Current = Anim.ChooseCorrectClock(Clocks);
double TimeLeft = Anim.ClampedTimeLeft(Current);
if (TimeLeft > max) max = TimeLeft;
}
}
return max;
}
void UlxScriptedAnimations::FadeGarbage(const UObject *WorldContextObject, TArray<int64> KeepIDs)
{
FlxWorldClocks Clocks = UlxScriptedAnimationLibrary::GetAllWorldClocks(WorldContextObject);