MCPcopy Create free account
hub / github.com/Voidware-Prohibited/ALSXT / StartSliding

Method StartSliding

Source/ALSXT/Private/AlsxtCharacter_Actions.cpp:46–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void AAlsxtCharacter::StartSliding(const float PlayRate, const float TargetYawAngle)
47{
48 if (GetLocalRole() <= ROLE_SimulatedProxy)
49 {
50 return;
51 }
52
53 auto* Montage{ SelectSlideMontage() };
54
55 if (!ALS_ENSURE(IsValid(Montage)) || !IsSlidingAllowedToStart(Montage))
56 {
57 return;
58 }
59
60 const auto StartYawAngle{ UE_REAL_TO_FLOAT(FRotator::NormalizeAxis(GetActorRotation().Yaw)) };
61
62 if (GetLocalRole() >= ROLE_Authority)
63 {
64 MulticastStartSliding(Montage, PlayRate, StartYawAngle, TargetYawAngle);
65 // OnSlidingStarted();
66 }
67 else
68 {
69 GetCharacterMovement()->FlushServerMoves();
70
71 StartSlidingImplementation(Montage, PlayRate, StartYawAngle, TargetYawAngle);
72 ServerStartSliding(Montage, PlayRate, StartYawAngle, TargetYawAngle);
73 // OnSlidingStarted();
74 }
75}
76
77UAnimMontage* AAlsxtCharacter::SelectSlideMontage_Implementation()
78{

Callers

nothing calls this directly

Calls 1

IsValidFunction · 0.85

Tested by

no test coverage detected