From afc34be5545f06c11bbb0259b4695aee676b10b9 Mon Sep 17 00:00:00 2001 From: Kevin Poretti Date: Fri, 21 Jul 2023 20:35:23 -0400 Subject: [PATCH] Initialize input buffer structs properly --- .../Input/FFInputBufferComponent.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Source/UnrealFightingFramework/Input/FFInputBufferComponent.h b/Source/UnrealFightingFramework/Input/FFInputBufferComponent.h index c8015dc..c9121f4 100644 --- a/Source/UnrealFightingFramework/Input/FFInputBufferComponent.h +++ b/Source/UnrealFightingFramework/Input/FFInputBufferComponent.h @@ -35,6 +35,14 @@ struct FFFInputState UPROPERTY(EditAnywhere, Meta = (Bitmask)) int32 Buttons; int32 DisabledButtons; + + FFFInputState() + : MoveAxes(FVector2D::ZeroVector) + , LookAxes(FVector2D::ZeroVector) + , Buttons(0) + , DisabledButtons(0) + { + } }; USTRUCT(BlueprintType) @@ -49,6 +57,12 @@ struct FFFInputCondition // The button state required for condition to be valid i.e. pressed or released UPROPERTY(EditAnywhere) EFFButtonState RequiredButtonState; + + FFFInputCondition() + : RequiredButtons(0) + , RequiredButtonState(EFFButtonState::BTNS_Pressed) + { + } }; USTRUCT(BlueprintType) @@ -61,6 +75,11 @@ struct FFFInputSequence UPROPERTY(EditAnywhere) int32 MaxDuration; + + FFFInputSequence() + : MaxDuration(0) + { + } }; UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )