15{
16 ACharacter* Character = Cast<ACharacter>(Context.
PlayerController->GetPawn());
17
18 if (Character == nullptr)
19 {
21 return;
22 }
23
24 UCharacterMovementComponent* MovementComponent = Character->GetCharacterMovement();
25
26 if (MovementComponent == nullptr)
27 {
29 return;
30 }
31
32 MovementComponent->DisableMovement();
33
34 IAbilitySystemInterface* ASI = Cast<IAbilitySystemInterface>(Character);
35
36 if (ASI == nullptr)
37 {
39 return;
40 }
41
42 UAbilitySystemComponent* ASC = ASI->GetAbilitySystemComponent();
43
44 if (ASC == nullptr)
45 {
47 return;
48 }
49
50 ASC->AddLooseGameplayTag(TAG_CHARACTER_STATE_ISBLOCKMOVEMENT);
51 ASC->AddLooseGameplayTag(TAG_CHARACTER_STATE_ISBLOCKINPUT);
52 ASC->CancelAllAbilities();
53}