diff --git a/Content/BPML_StateMacros.uasset b/Content/BPML_StateMacros.uasset index be47fa1..a5b5ec8 100644 Binary files a/Content/BPML_StateMacros.uasset and b/Content/BPML_StateMacros.uasset differ diff --git a/Source/UnrealFightingFramework/Input/FFPlayerController.h b/Source/UnrealFightingFramework/Input/FFPlayerController.h index bcc485b..e1fcc05 100644 --- a/Source/UnrealFightingFramework/Input/FFPlayerController.h +++ b/Source/UnrealFightingFramework/Input/FFPlayerController.h @@ -52,8 +52,10 @@ public: // End of IFFSystemInterface // IFFStateOwnerInterface + UFUNCTION() virtual bool CheckInputSequence(const FFFInputSequence& InInputSequence) override; + UFUNCTION() virtual bool CheckInputSequences(const TArray& InputSequences) override; virtual void DisableMostRecentInput() override; diff --git a/Source/UnrealFightingFramework/State/FFState.cpp b/Source/UnrealFightingFramework/State/FFState.cpp index 231beac..962480f 100644 --- a/Source/UnrealFightingFramework/State/FFState.cpp +++ b/Source/UnrealFightingFramework/State/FFState.cpp @@ -142,7 +142,12 @@ void UFFState::MovementModeChanged(EMovementMode PrevMovementMode, uint8 Previou OnMovementModeChanged(PrevMovementMode, PreviousCustomMode, NewMovementMode, NewCustomMode, InStateContext); - if(NewMovementMode != ReqMovementMode || ((ReqMovementMode == MOVE_Custom) && NewCustomMode != RequiredCustomMode)) + // TODO: Movement mode MOVE_None means movement is disabled but in this context it means no movement + // mode is specifically required to stay in this state i.e. changing from falling to walking + // will not exit out of this state. I think I want to use my own movement mode enum just so I + // can explicitly document this is what is meant by none + if((ReqMovementMode != EMovementMode::MOVE_None && NewMovementMode != ReqMovementMode) || + ((ReqMovementMode == MOVE_Custom) && NewCustomMode != RequiredCustomMode)) { Finish(InStateContext); } diff --git a/Source/UnrealFightingFramework/State/IFFStateOwnerInterface.h b/Source/UnrealFightingFramework/State/IFFStateOwnerInterface.h index 75631aa..5aeb2e4 100644 --- a/Source/UnrealFightingFramework/State/IFFStateOwnerInterface.h +++ b/Source/UnrealFightingFramework/State/IFFStateOwnerInterface.h @@ -7,7 +7,7 @@ #include "IFFStateOwnerInterface.generated.h" -UINTERFACE(MinimalAPI) +UINTERFACE(MinimalAPI, NotBlueprintable) class UFFStateOwnerInterface : public UInterface { GENERATED_BODY() @@ -21,8 +21,10 @@ class UNREALFIGHTINGFRAMEWORK_API IFFStateOwnerInterface GENERATED_BODY() public: + UFUNCTION(BlueprintCallable, Category="UFF State Owner Interface") virtual bool CheckInputSequence(const FFFInputSequence& InInputSequence) = 0; + UFUNCTION(BlueprintCallable, Category="UFF State Owner Interface") virtual bool CheckInputSequences(const TArray& InInputSequences) = 0; virtual void DisableMostRecentInput() = 0;