From c1afc827e017a6835309239f6eb9a74ba4893855 Mon Sep 17 00:00:00 2001 From: baz Date: Thu, 1 Feb 2024 20:35:55 +0000 Subject: [PATCH] Disallow Dashing and Sliding while Throwing --- Source/Nakatomi/PlayerCharacter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Nakatomi/PlayerCharacter.cpp b/Source/Nakatomi/PlayerCharacter.cpp index d1ea511..fc53a93 100644 --- a/Source/Nakatomi/PlayerCharacter.cpp +++ b/Source/Nakatomi/PlayerCharacter.cpp @@ -575,7 +575,8 @@ void APlayerCharacter::EndCrouchCallback(const FInputActionInstance& Instance) void APlayerCharacter::BeginSlideCallback(const FInputActionInstance& Instance) { - if (UNakatomiCMC* cmc = GetCharacterMovementComponent()) + UNakatomiCMC* cmc = GetCharacterMovementComponent(); + if (cmc && !IsThrowing) { cmc->EnableSlide(); } @@ -591,7 +592,8 @@ void APlayerCharacter::EndSlideCallback(const FInputActionInstance& Instance) void APlayerCharacter::BeginDashCallback(const FInputActionInstance& Instance) { - if (UNakatomiCMC* cmc = GetCharacterMovementComponent()) + UNakatomiCMC* cmc = GetCharacterMovementComponent(); + if (cmc && !IsThrowing) { cmc->EnableDash(); }