Add speed check to allow firing when movement speed is low enough while sprint key is held
This commit is contained in:
parent
c5edf56955
commit
0ec7f89c57
|
@ -249,7 +249,7 @@ void APlayerCharacter::EndJumpCallback(const FInputActionInstance& Instance)
|
|||
|
||||
void APlayerCharacter::BeginFireCallback(const FInputActionInstance& Instance)
|
||||
{
|
||||
if (CurrentWeapon == nullptr || CurrentWeapon->GetCurrentWeaponStatus()->GetValue() != Idle || IsSprinting)
|
||||
if (CurrentWeapon == nullptr || CurrentWeapon->GetCurrentWeaponStatus()->GetValue() != Idle || (IsSprinting && GetVelocity().Length() > 500.0f))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue