Support for StartAnimation,WarpToFinal,BlendToFinal

This commit is contained in:
2023-09-15 15:44:01 -04:00
parent cd3c82f2c4
commit fb65d23230
5 changed files with 124 additions and 78 deletions

View File

@@ -127,13 +127,25 @@ void AIntegrationGameModeBase::UpdateTangibles() {
for (uint64 hash : aborted) {
IlxTangibleInterface::Execute_AbortAnimation(t->Actor, hash);
}
if (t->AnimTracker.AnyUnstarted()) {
FlxAnimStoredStep step = t->AnimTracker.GetUnstarted();
bool started = IlxTangibleInterface::Execute_StartAnimation(t->Actor, step.Hash, step.Body.size());
if (started) {
t->AnimTracker.Started(step.Hash);
}
FlxAnimStoredStep step;
ElxAnimPlaybackMode mode = t->AnimTracker.GetNextStep(step);
bool started = false;
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);
}
}
}