Disallow Dashing and Sliding while Throwing

This commit is contained in:
baz 2024-02-01 20:35:55 +00:00
parent 4930aff6c2
commit c1afc827e0
1 changed files with 4 additions and 2 deletions

View File

@ -575,7 +575,8 @@ void APlayerCharacter::EndCrouchCallback(const FInputActionInstance& Instance)
void APlayerCharacter::BeginSlideCallback(const FInputActionInstance& Instance) void APlayerCharacter::BeginSlideCallback(const FInputActionInstance& Instance)
{ {
if (UNakatomiCMC* cmc = GetCharacterMovementComponent()) UNakatomiCMC* cmc = GetCharacterMovementComponent();
if (cmc && !IsThrowing)
{ {
cmc->EnableSlide(); cmc->EnableSlide();
} }
@ -591,7 +592,8 @@ void APlayerCharacter::EndSlideCallback(const FInputActionInstance& Instance)
void APlayerCharacter::BeginDashCallback(const FInputActionInstance& Instance) void APlayerCharacter::BeginDashCallback(const FInputActionInstance& Instance)
{ {
if (UNakatomiCMC* cmc = GetCharacterMovementComponent()) UNakatomiCMC* cmc = GetCharacterMovementComponent();
if (cmc && !IsThrowing)
{ {
cmc->EnableDash(); cmc->EnableDash();
} }