From c654bfd8fb54ed6ca78fc93b3c0643010e872e1f Mon Sep 17 00:00:00 2001 From: Kevin Poretti Date: Wed, 18 Oct 2023 22:44:04 -0400 Subject: [PATCH] Make sure owner and avatar implement interfaces in CanTransition --- Source/UnrealFightingFramework/State/FFState.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/UnrealFightingFramework/State/FFState.cpp b/Source/UnrealFightingFramework/State/FFState.cpp index 95cd2bd..231beac 100644 --- a/Source/UnrealFightingFramework/State/FFState.cpp +++ b/Source/UnrealFightingFramework/State/FFState.cpp @@ -37,6 +37,11 @@ bool UFFState::CanTransition(const FFFStateContext& InStateContext) return false; } } + else + { + UE_LOG(LogTemp, Error, TEXT("CanTransition :: Avatar of FFFStateContext does not implement IFFStateAvatarInterface")); + return false; + } IFFStateOwnerInterface* SOI = Cast(InStateContext.Owner); if(SOI) @@ -46,6 +51,11 @@ bool UFFState::CanTransition(const FFFStateContext& InStateContext) return false; } } + else + { + UE_LOG(LogTemp, Error, TEXT("CanTransition :: Owner of FFFStateContext does not implement IFFStateOwnerInterface")); + return false; + } return OnCanTransition(InStateContext); }