diff --git a/Source/UnrealFightingFramework/Input/FFPlayerController.cpp b/Source/UnrealFightingFramework/Input/FFPlayerController.cpp index 24a059b..2a3f8cd 100644 --- a/Source/UnrealFightingFramework/Input/FFPlayerController.cpp +++ b/Source/UnrealFightingFramework/Input/FFPlayerController.cpp @@ -56,6 +56,7 @@ void AFFPlayerController::AddCurrentInputToBuffer() //SendInputsToRemote(); } + bool AFFPlayerController::CheckInputSequence(const FFFInputSequence& InInputSequence) { return InputBuffer->CheckInputSequence(InInputSequence); @@ -80,6 +81,7 @@ bool AFFPlayerController::CheckInputSequences(const TArray& In return false; } + void AFFPlayerController::DisableMostRecentInput() { InputBuffer->DisableMostRecentInput(); @@ -101,3 +103,12 @@ void AFFPlayerController::SetupInputComponent() } } } + + +void AFFPlayerController::FlushPressedKeys() +{ + Super::FlushPressedKeys(); + + RawInput.Buttons = 0; + RawInput.MoveAxes = FVector2D::ZeroVector; +} diff --git a/Source/UnrealFightingFramework/Input/FFPlayerController.h b/Source/UnrealFightingFramework/Input/FFPlayerController.h index da47354..cdceb7d 100644 --- a/Source/UnrealFightingFramework/Input/FFPlayerController.h +++ b/Source/UnrealFightingFramework/Input/FFPlayerController.h @@ -75,6 +75,8 @@ public: // APlayerController interface virtual void SetupInputComponent() override; + + virtual void FlushPressedKeys() override; // End of APlayerController interface protected: