From 40881ec284f89655c7718ebd4813676840c5dc40 Mon Sep 17 00:00:00 2001 From: teppy999 Date: Fri, 15 Sep 2023 01:08:19 -0400 Subject: [PATCH] More progress on anim queue --- Content/TanActor.uasset | 4 ++-- Source/Integration/IntegrationGameModeBase.cpp | 13 +++++++++++++ Source/Integration/TangibleInterface.h | 7 +++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Content/TanActor.uasset b/Content/TanActor.uasset index 15e395f4..41d02421 100644 --- a/Content/TanActor.uasset +++ b/Content/TanActor.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76f070f6bd960f1d6f4e73f7b6a60fed5a50aac764cfc6b6e456325d4323651a -size 36294 +oid sha256:d60a5145deb04f4b59021ab59daafad0d46188eb0a0edb71f219839ae6366efe +size 60404 diff --git a/Source/Integration/IntegrationGameModeBase.cpp b/Source/Integration/IntegrationGameModeBase.cpp index ba780ecd..c4fa4699 100644 --- a/Source/Integration/IntegrationGameModeBase.cpp +++ b/Source/Integration/IntegrationGameModeBase.cpp @@ -122,6 +122,19 @@ void AIntegrationGameModeBase::UpdateTangibles() { UTangible* t = TangibleManager.GetTangible(tanid); check(t != nullptr); t->AnimTracker.Update(aqueue); + + TArray aborted = t->AnimTracker.GetAborted(); + for (uint64 hash : aborted) { + ITangibleInterface::Execute_AbortAnimation(t->Actor, hash); + } + + if (t->AnimTracker.AnyUnstarted()) { + FAnimStoredStep step = t->AnimTracker.GetUnstarted(); + bool started = ITangibleInterface::Execute_StartAnimation(t->Actor, step.Hash, step.Body.size()); + if (started) { + t->AnimTracker.Started(step.Hash); + } + } } } diff --git a/Source/Integration/TangibleInterface.h b/Source/Integration/TangibleInterface.h index bdcbdbad..99df093a 100644 --- a/Source/Integration/TangibleInterface.h +++ b/Source/Integration/TangibleInterface.h @@ -22,6 +22,9 @@ class INTEGRATION_API ITangibleInterface // Add interface functions to this class. This is the class that will be inherited to implement this interface. public: - UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "Tangible Functionality") - void TurnFromCXX(); + UFUNCTION(BlueprintImplementableEvent, Category = "Tangible Functionality") + bool AbortAnimation(int64 hash); + + UFUNCTION(BlueprintImplementableEvent, Category = "Tangible Functionality") + bool StartAnimation(int64 hash, int StrLen); };