From b66a93d108c0e00863c66dfba7a26a837946ea58 Mon Sep 17 00:00:00 2001 From: Kevin Poretti Date: Sun, 4 Feb 2024 19:08:47 -0500 Subject: [PATCH] Pass state context to GetFollowupState --- Source/UnrealFightingFramework/State/FFState.cpp | 6 +++--- Source/UnrealFightingFramework/State/FFState.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/UnrealFightingFramework/State/FFState.cpp b/Source/UnrealFightingFramework/State/FFState.cpp index 3979892..b0ee349 100644 --- a/Source/UnrealFightingFramework/State/FFState.cpp +++ b/Source/UnrealFightingFramework/State/FFState.cpp @@ -164,9 +164,9 @@ void UFFState::Finish(const FFFStateContext& InStateContext, EFFStateFinishReaso // to rethink the way we handle logic for ending a state and which class is in charge of handling // what - if(GetFollowupState() != NAME_None) + if(GetFollowupState(InStateContext) != NAME_None) { - InStateContext.Parent->GoToState(GetFollowupState(), StateFinishReason); + InStateContext.Parent->GoToState(GetFollowupState(InStateContext), StateFinishReason); } else { @@ -175,7 +175,7 @@ void UFFState::Finish(const FFFStateContext& InStateContext, EFFStateFinishReaso } -FName UFFState::GetFollowupState_Implementation() +FName UFFState::GetFollowupState_Implementation(const FFFStateContext& InStateContext) { return FollowupState; } diff --git a/Source/UnrealFightingFramework/State/FFState.h b/Source/UnrealFightingFramework/State/FFState.h index bacea5a..484d37a 100644 --- a/Source/UnrealFightingFramework/State/FFState.h +++ b/Source/UnrealFightingFramework/State/FFState.h @@ -273,7 +273,7 @@ public: * NAME_None if the FollowupState is not specified. */ UFUNCTION(BlueprintNativeEvent, Category="UFF|State|Events") - FName GetFollowupState(); + FName GetFollowupState(const FFFStateContext& InStateContext); // TODO: Don't like this at all and needs to be refactored or redesigned UFUNCTION(BlueprintCallable, Category="UFF|State|Animations")