Now passing FlxAnimationStep into the blueprint

This commit is contained in:
2023-09-19 22:08:15 -04:00
parent b74f9495fc
commit 1d8bdfc7bf
5 changed files with 222 additions and 191 deletions

View File

@@ -136,28 +136,13 @@ void AIntegrationGameModeBase::UpdateTangibles() {
for (uint64 hash : aborted) {
IlxTangibleInterface::Execute_AbortAnimation(t->Actor, hash);
}
FlxAnimStoredStep step;
ElxAnimPlaybackMode mode = t->AnimTracker.GetNextStep(step);
bool started = false;
if (mode != ElxAnimPlaybackMode::INVALID) {
FlxAnimStepDecoder::UnpackInto(step.Body, TEXT("aq"), true, t->Actor);
}
switch (mode) {
case ElxAnimPlaybackMode::INVALID:
started = false; // Nothing to do.
break;
case ElxAnimPlaybackMode::WARP_TO_FINAL:
started = IlxTangibleInterface::Execute_WarpToFinal(t->Actor, step.Hash, step.Body.size());
break;
case ElxAnimPlaybackMode::BLEND_TO_FINAL:
started = IlxTangibleInterface::Execute_BlendToFinal(t->Actor, step.Hash, step.Body.size());
break;
case ElxAnimPlaybackMode::START_ANIMATION:
started = IlxTangibleInterface::Execute_StartAnimation(t->Actor, step.Hash, step.Body.size());
break;
}
if (started) {
t->AnimTracker.StartedStep(step.Hash);
FlxAnimationStep step;
ElxAnimationMode mode = t->AnimTracker.GetNextStep(step);
if (mode != ElxAnimationMode::INVALID) {
bool started = IlxTangibleInterface::Execute_StartAnimation(t->Actor, mode, step);
if (started) {
t->AnimTracker.StartedStep(step.Hash);
}
}
}
}