Reset current input when losing focus of game viewport
This commit is contained in:
parent
c09094e186
commit
c3a0d1f481
@ -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<FFFInputSequence>& 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;
|
||||
}
|
||||
|
@ -75,6 +75,8 @@ public:
|
||||
|
||||
// APlayerController interface
|
||||
virtual void SetupInputComponent() override;
|
||||
|
||||
virtual void FlushPressedKeys() override;
|
||||
// End of APlayerController interface
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user