diff --git a/Source/ComboInput/Private/Components/ComboManagerComponent.cpp b/Source/ComboInput/Private/Components/ComboManagerComponent.cpp index 3fdce4c..2a3afd4 100644 --- a/Source/ComboInput/Private/Components/ComboManagerComponent.cpp +++ b/Source/ComboInput/Private/Components/ComboManagerComponent.cpp @@ -77,12 +77,10 @@ void UComboManagerComponent::ActivateComboAction(const UComboInputAsset *Input) this->BroadcastDelegates(*ComboAction, EComboActionTriggerEvent::Activated); UE_LOG(LogComboManagerComponent, Verbose, TEXT("Fallback action %s activated"), *(*ComboAction)->ActionName.ToString()); } - // If we haven't found an action to perform, reset the combo and activate using the default start node. + // If we haven't found an action to perform, end here. else { - this->ActiveNode = nullptr; - this->ActivateComboAction(Input); - return; + UE_LOG(LogComboManagerComponent, Verbose, TEXT("No action found for %s"), *Input->ComboInputName.ToString()); } } void UComboManagerComponent::DEBUG__UnlockAction(TObjectPtr Unlock) diff --git a/Source/ComboInput/Private/Components/InputBufferComponent.cpp b/Source/ComboInput/Private/Components/InputBufferComponent.cpp index a219e52..5c886fb 100644 --- a/Source/ComboInput/Private/Components/InputBufferComponent.cpp +++ b/Source/ComboInput/Private/Components/InputBufferComponent.cpp @@ -28,9 +28,16 @@ void UInputBufferComponent::BeginPlay() TSet InputActionsToBind; for (TSoftObjectPtr ComboInput : Settings->ComboActions) { - for (const UInputAction *InputAction : ComboInput->ActionGroup) + if (ComboInput.IsValid()) { - InputActionsToBind.Add(InputAction); + for (const UInputAction *InputAction : ComboInput->ActionGroup) + { + InputActionsToBind.Add(InputAction); + } + } + else + { + UE_LOG(LogInputBufferComponent, Verbose, TEXT("Invalid combo action found in Combo Actions list in %s"), *Settings->GetClass()->GetName()); } } for (const UInputAction *InputAction : InputActionsToBind) @@ -52,11 +59,18 @@ void UInputBufferComponent::AddActionToBuffer(const FInputActionValue &Value, co const UInputBufferSubsystemGlobalSettings *Settings = GetDefault(); for (TSoftObjectPtr ComboInput : Settings->ComboActions) { - if (ComboInput->MatchesInputActions(this->MostRecentActions)) + if (ComboInput.IsValid()) { - this->ActivateComboInput(ComboInput.Get()); + if (ComboInput->MatchesInputActions(this->MostRecentActions)) + { + this->ActivateComboInput(ComboInput.Get()); - break; + break; + } + } + else + { + UE_LOG(LogInputBufferComponent, Verbose, TEXT("Invalid combo action found in Combo Actions list in %s"), *Settings->GetClass()->GetName()); } }