15{
16 Super::OnActivated();
17
18 ACharacter* Character = Cast<ACharacter>(GetOwningPlayerPawn());
19
20 if (Character == nullptr)
21 {
23 return;
24 }
25
26 UCharacterMovementComponent* MovementComponent = Character->GetCharacterMovement();
27
28 if (MovementComponent == nullptr)
29 {
31 return;
32 }
33
34 IAbilitySystemInterface* ASI = Cast<IAbilitySystemInterface>(Character);
35
36 if (ASI == nullptr)
37 {
39 return;
40 }
41
42 UAbilitySystemComponent* AbilitySystemComponent = ASI->GetAbilitySystemComponent();
43
44 if (AbilitySystemComponent == nullptr)
45 {
47 return;
48 }
49
50 MovementComponent->DisableMovement();
51 AbilitySystemComponent->AddLooseGameplayTag(TAG_CHARACTER_STATE_ISBLOCKMOVEMENT);
52 AbilitySystemComponent->AddLooseGameplayTag(TAG_CHARACTER_STATE_ISBLOCKINPUT);
53 AbilitySystemComponent->CancelAllAbilities();
54}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:40
#define NAMEOF(Type)
Definition CK_UE.h:30
#define LOG_WARNING(Category, Format,...)
Definition CK_UE.h:39