From b27d3a7d95f667b7e1445d76f88490704331affa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fa=20Can=20Yan=C4=B1ko=C4=9Flu?= Date: Mon, 21 Mar 2022 07:46:02 +0300 Subject: [PATCH 01/10] Update README.md --- README.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f241d82b..79c8389b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Advanced Locomotion System Community +# Advanced Locomotion System - Community Version ![image](https://github.com/dyanikoglu/ALS-Community/raw/main/Resources/Readme_Content_2.gif) -Replicated and optimized community version of [Advanced Locomotion System V4](https://www.unrealengine.com/marketplace/en-US/product/advanced-locomotion-system-v1) for **Unreal Engine 5.0** with additional bug fixes. +Replicated and optimized version of [Advanced Locomotion System V4](https://www.unrealengine.com/marketplace/en-US/product/advanced-locomotion-system-v1) for **Unreal Engine 5.0** with additional bug fixes

@@ -14,16 +14,14 @@ Replicated and optimized community version of [Advanced Locomotion System V4](ht *Mac, Android, IOS, and console builds are not tested and supported at the moment. Use the plugin on those platforms with your own risk.* ## Features -- Based on latest marketplace release (V4) of Advanced Locomotion System -- Fully implemented in C++ -- Full replication support with low bandwidth usage (Ragdoll replication is in experimental state) -- Plugin structure -- Animation Blueprint is optimized with new property binding feature -- Inputs are handled with Enhanced Input System -- Highly optimized for production -- Mantling and debugging features are implemented as a separate actor components to reduce total overhead on base character class -- Improved footstep behavior with Niagara particle & decal support -- Lots of bug fixes additional to marketplace version +- Fully implemented and optimized in C++, and implementation is based on latest marketplace release (V4) of ALS +- Complete replication support with low bandwidth usage (Ragdoll replication is in experimental state) +- Redesigned as plugin +- Animation blueprint is optimized with new property binding feature +- Player input is handled with new Enhanced Input Plugin +- Mantling and debugging features are implemented as separate actor components to reduce total overhead on base character class +- Improved footstep system with decal & Niagara particle support +- Lots of additional bug fixes ## Known Issues & Discussion - See [Issues](https://github.com/dyanikoglu/ALS-Community/issues) section for list of known issues From 1e16aa2544cb90952097a0a7ae912640b2895877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fa=20Can=20Yan=C4=B1ko=C4=9Flu?= Date: Mon, 21 Mar 2022 07:47:10 +0300 Subject: [PATCH 02/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 79c8389b..2909433d 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Replicated and optimized version of [Advanced Locomotion System V4](https://www. *Mac, Android, IOS, and console builds are not tested and supported at the moment. Use the plugin on those platforms with your own risk.* ## Features -- Fully implemented and optimized in C++, and implementation is based on latest marketplace release (V4) of ALS +- Fully implemented and optimized in C++. Implementation is based on latest marketplace release (V4) of ALS - Complete replication support with low bandwidth usage (Ragdoll replication is in experimental state) - Redesigned as plugin - Animation blueprint is optimized with new property binding feature From c8bd2a1dcb00ec93163859722d1c2c80fada0b6e Mon Sep 17 00:00:00 2001 From: Guy Lundvall Date: Mon, 21 Mar 2022 23:35:24 -0700 Subject: [PATCH 03/10] Cleanup whitespace, some typos, missing virtual --- .../Private/Character/ALSBaseCharacter.cpp | 10 ++++----- .../Private/Character/ALSPlayerController.cpp | 4 ++-- .../Animation/ALSCharacterAnimInstance.cpp | 4 ++-- .../Notify/ALSAnimNotifyCameraShake.cpp | 4 ++-- .../Notify/ALSAnimNotifyFootstep.cpp | 4 ++-- .../ALSAnimNotifyGroundedEntryState.cpp | 2 +- .../Notify/ALSNotifyStateEarlyBlendOut.cpp | 2 +- .../Notify/ALSNotifyStateMovementAction.cpp | 4 ++-- .../Notify/ALSNotifyStateOverlayOverride.cpp | 4 ++-- .../Private/Components/ALSDebugComponent.cpp | 5 ++--- .../Private/Components/ALSMantleComponent.cpp | 14 ++++++------ .../Public/Character/ALSBaseCharacter.h | 22 +++++++++---------- .../Character/ALSCharacterMovementComponent.h | 2 +- .../Public/Character/ALSPlayerController.h | 6 ++--- .../Animation/ALSCharacterAnimInstance.h | 18 +++++++-------- .../Public/Components/ALSDebugComponent.h | 11 +++++----- .../Public/Components/ALSMantleComponent.h | 2 +- .../ALSV4_CPP/Public/Library/ALSMathLibrary.h | 4 ++-- 18 files changed, 60 insertions(+), 62 deletions(-) diff --git a/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp b/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp index fb79e71f..59de39d8 100644 --- a/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp +++ b/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp @@ -75,7 +75,7 @@ void AALSBaseCharacter::Replicated_PlayMontage_Implementation(UAnimMontage* Mont { GetMesh()->GetAnimInstance()->Montage_Play(Montage, PlayRate); } - + Server_PlayMontage(Montage, PlayRate); } @@ -186,7 +186,7 @@ void AALSBaseCharacter::RagdollStart() // Fixes character mesh is showing default A pose for a split-second just before ragdoll ends in listen server games GetMesh()->bOnlyAllowAutonomousTickPose = true; - + SetReplicateMovement(false); } @@ -653,7 +653,7 @@ void AALSBaseCharacter::GetCameraParameters(float& TPFOVOut, float& FPFOVOut, bo void AALSBaseCharacter::RagdollUpdate(float DeltaTime) { GetMesh()->bOnlyAllowAutonomousTickPose = false; - + // Set the Last Ragdoll Velocity. const FVector NewRagdollVel = GetMesh()->GetPhysicsLinearVelocity(NAME_root); LastRagdollVelocity = (NewRagdollVel != FVector::ZeroVector || IsLocallyControlled()) @@ -686,7 +686,7 @@ void AALSBaseCharacter::SetActorLocationDuringRagdoll(float DeltaTime) } } - // Determine wether the ragdoll is facing up or down and set the target rotation accordingly. + // Determine whether the ragdoll is facing up or down and set the target rotation accordingly. const FRotator PelvisRot = GetMesh()->GetSocketRotation(NAME_Pelvis); if (bReversedPelvis) { @@ -1143,7 +1143,7 @@ EALSGait AALSBaseCharacter::GetActualGait(EALSGait AllowedGait) const { // Get the Actual Gait. This is calculated by the actual movement of the character, and so it can be different // from the desired gait or allowed gait. For instance, if the Allowed Gait becomes walking, - // the Actual gait will still be running untill the character decelerates to the walking speed. + // the Actual gait will still be running until the character decelerates to the walking speed. const float LocWalkSpeed = MyCharacterMovementComponent->CurrentMovementSettings.WalkSpeed; const float LocRunSpeed = MyCharacterMovementComponent->CurrentMovementSettings.RunSpeed; diff --git a/Source/ALSV4_CPP/Private/Character/ALSPlayerController.cpp b/Source/ALSV4_CPP/Private/Character/ALSPlayerController.cpp index bfd29f81..b173ce75 100644 --- a/Source/ALSV4_CPP/Private/Character/ALSPlayerController.cpp +++ b/Source/ALSV4_CPP/Private/Character/ALSPlayerController.cpp @@ -25,7 +25,7 @@ void AALSPlayerController::OnPossess(APawn* NewPawn) } SetupInputs(); - + UALSDebugComponent* DebugComp = Cast(PossessedCharacter->GetComponentByClass(UALSDebugComponent::StaticClass())); if (DebugComp) { @@ -39,7 +39,7 @@ void AALSPlayerController::OnRep_Pawn() PossessedCharacter = Cast(GetPawn()); SetupCamera(); SetupInputs(); - + UALSDebugComponent* DebugComp = Cast(PossessedCharacter->GetComponentByClass(UALSDebugComponent::StaticClass())); if (DebugComp) { diff --git a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp index 5b079d1d..3f18af12 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp @@ -784,7 +784,7 @@ float UALSCharacterAnimInstance::CalculateLandPrediction() const { // Calculate the land prediction weight by tracing in the velocity direction to find a walkable surface the character // is falling toward, and getting the 'Time' (range of 0-1, 1 being maximum, 0 being about to land) till impact. - // The Land Prediction Curve is used to control how the time affects the final weight for a smooth blend. + // The Land Prediction Curve is used to control how the time affects the final weight for a smooth blend. if (InAir.FallSpeed >= -200.0f) { return 0.0f; @@ -872,7 +872,7 @@ void UALSCharacterAnimInstance::TurnInPlace(FRotator TargetRotation, float PlayR FRotator Delta = TargetRotation - CharacterInformation.CharacterActorRotation; Delta.Normalize(); const float TurnAngle = Delta.Yaw; - + // Step 2: Choose Turn Asset based on the Turn Angle and Stance FALSTurnInPlaceAsset TargetTurnAsset; if (Stance.Standing()) diff --git a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyCameraShake.cpp b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyCameraShake.cpp index a344ce41..9bfc50ba 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyCameraShake.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyCameraShake.cpp @@ -1,5 +1,5 @@ // Copyright: Copyright (C) 2022 Doğa Can Yanıkoğlu -// Source Code: https://github.com/dyanikoglu/ALS-Community +// Source Code: https://github.com/dyanikoglu/ALS-Community #include "Character/Animation/Notify/ALSAnimNotifyCameraShake.h" @@ -8,7 +8,7 @@ void UALSAnimNotifyCameraShake::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) { Super::Notify(MeshComp, Animation, EventReference); - + APawn* OwnerPawn = Cast(MeshComp->GetOwner()); if (OwnerPawn) { diff --git a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyFootstep.cpp b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyFootstep.cpp index 17cf9b00..c01f024c 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyFootstep.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyFootstep.cpp @@ -22,12 +22,12 @@ FName UALSAnimNotifyFootstep::NAME_Foot_R(TEXT("Foot_R")); void UALSAnimNotifyFootstep::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) { Super::Notify(MeshComp, Animation, EventReference); - + if (!MeshComp) { return; } - + AActor* MeshOwner = MeshComp->GetOwner(); if (!MeshOwner) { diff --git a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyGroundedEntryState.cpp b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyGroundedEntryState.cpp index 3727d018..684a8b41 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyGroundedEntryState.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyGroundedEntryState.cpp @@ -10,7 +10,7 @@ void UALSAnimNotifyGroundedEntryState::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) { Super::Notify(MeshComp, Animation, EventReference); - + AALSBaseCharacter* Character = Cast(MeshComp->GetOwner()); if (Character) { diff --git a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateEarlyBlendOut.cpp b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateEarlyBlendOut.cpp index ffa992fe..a7df65cf 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateEarlyBlendOut.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateEarlyBlendOut.cpp @@ -10,7 +10,7 @@ void UALSNotifyStateEarlyBlendOut::NotifyTick(USkeletalMeshComponent* MeshComp, float FrameDeltaTime, const FAnimNotifyEventReference& EventReference) { Super::NotifyTick(MeshComp, Animation, FrameDeltaTime, EventReference); - + if (!MeshComp || !MeshComp->GetAnimInstance()) { return; diff --git a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateMovementAction.cpp b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateMovementAction.cpp index 5431ed05..175b5913 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateMovementAction.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateMovementAction.cpp @@ -10,7 +10,7 @@ void UALSNotifyStateMovementAction::NotifyBegin(USkeletalMeshComponent* MeshComp float TotalDuration, const FAnimNotifyEventReference& EventReference) { Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference); - + AALSBaseCharacter* BaseCharacter = Cast(MeshComp->GetOwner()); if (BaseCharacter) { @@ -22,7 +22,7 @@ void UALSNotifyStateMovementAction::NotifyEnd(USkeletalMeshComponent* MeshComp, const FAnimNotifyEventReference& EventReference) { Super::NotifyEnd(MeshComp, Animation, EventReference); - + AALSBaseCharacter* BaseCharacter = Cast(MeshComp->GetOwner()); if (BaseCharacter && BaseCharacter->GetMovementAction() == MovementAction) { diff --git a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateOverlayOverride.cpp b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateOverlayOverride.cpp index 4d498552..5152ba3c 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateOverlayOverride.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateOverlayOverride.cpp @@ -11,7 +11,7 @@ void UALSNotifyStateOverlayOverride::NotifyBegin(USkeletalMeshComponent* MeshCom float TotalDuration, const FAnimNotifyEventReference& EventReference) { Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference); - + AALSBaseCharacter* Character = Cast(MeshComp->GetOwner()); if (Character) { @@ -22,7 +22,7 @@ void UALSNotifyStateOverlayOverride::NotifyBegin(USkeletalMeshComponent* MeshCom void UALSNotifyStateOverlayOverride::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) { Super::NotifyEnd(MeshComp, Animation, EventReference); - + AALSBaseCharacter* Character = Cast(MeshComp->GetOwner()); if (Character) { diff --git a/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp b/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp index 83452a64..00fe5f8c 100644 --- a/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp +++ b/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp @@ -82,7 +82,7 @@ void UALSDebugComponent::FocusedDebugCharacterCycle(bool bValue) { // Refresh list, so we can also debug runtime spawned characters & remove despawned characters back DetectDebuggableCharactersInWorld(); - + if (FocusedDebugCharacterIndex == INDEX_NONE) { // Return here as no AALSBaseCharacter where found during call of BeginPlay. @@ -114,7 +114,7 @@ void UALSDebugComponent::FocusedDebugCharacterCycle(bool bValue) void UALSDebugComponent::BeginPlay() { Super::BeginPlay(); - + OwnerCharacter = Cast(GetOwner()); DebugFocusCharacter = OwnerCharacter; if (OwnerCharacter) @@ -323,4 +323,3 @@ void UALSDebugComponent::DrawDebugSphereTraceSingle(const UWorld* World, } } } - diff --git a/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp b/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp index bceab79e..f740749f 100644 --- a/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp +++ b/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp @@ -115,7 +115,7 @@ void UALSMantleComponent::MantleStart(float MantleHeight, const FALSComponentAnd // Step 3: Set the Mantle Target and calculate the Starting Offset // (offset amount between the actor and target transform). MantleTarget = MantleLedgeWS.Transform; - MantleActualStartOffset = UALSMathLibrary::TransfromSub(OwnerCharacter->GetActorTransform(), MantleTarget); + MantleActualStartOffset = UALSMathLibrary::TransformSub(OwnerCharacter->GetActorTransform(), MantleTarget); // Step 4: Calculate the Animated Start Offset from the Target Location. // This would be the location the actual animation starts at relative to the Target Transform. @@ -123,7 +123,7 @@ void UALSMantleComponent::MantleStart(float MantleHeight, const FALSComponentAnd RotatedVector.Z = MantleParams.StartingOffset.Z; const FTransform StartOffset(MantleTarget.Rotator(), MantleTarget.GetLocation() - RotatedVector, FVector::OneVector); - MantleAnimatedStartOffset = UALSMathLibrary::TransfromSub(StartOffset, MantleTarget); + MantleAnimatedStartOffset = UALSMathLibrary::TransformSub(StartOffset, MantleTarget); // Step 5: Clear the Character Movement Mode and set the Movement State to Mantling OwnerCharacter->GetCharacterMovement()->SetMovementMode(MOVE_None); @@ -139,7 +139,7 @@ void UALSMantleComponent::MantleStart(float MantleHeight, const FALSComponentAnd MantleTimeline->SetPlayRate(MantleParams.PlayRate); MantleTimeline->PlayFromStart(); - // Step 7: Play the Anim Montaget if valid. + // Step 7: Play the Anim Montage if valid. if (MantleParams.AnimMontage && OwnerCharacter->GetMesh()->GetAnimInstance()) { OwnerCharacter->GetMesh()->GetAnimInstance()->Montage_Play(MantleParams.AnimMontage, MantleParams.PlayRate, @@ -307,7 +307,7 @@ void UALSMantleComponent::Multicast_MantleStart_Implementation(float MantleHeigh } } -// This function is called by "MantleTimeline" using BindUFunction in the AALSBaseCharacter::BeginPlay during the default settings initalization. +// This function is called by "MantleTimeline" using BindUFunction in the AALSBaseCharacter::BeginPlay during the default settings initialization. void UALSMantleComponent::MantleUpdate(float BlendIn) { if (!OwnerCharacter) @@ -361,13 +361,13 @@ void UALSMantleComponent::MantleUpdate(float BlendIn) // Blend from the currently blending transforms into the final mantle target using the X // value of the Position/Correction Curve. const FTransform& ResultLerp = UKismetMathLibrary::TLerp( - UALSMathLibrary::TransfromAdd(MantleTarget, ResultTransform), MantleTarget, + UALSMathLibrary::TransformAdd(MantleTarget, ResultTransform), MantleTarget, PositionAlpha); // Initial Blend In (controlled in the timeline curve) to allow the actor to blend into the Position/Correction - // curve at the midoint. This prevents pops when mantling an object lower than the animated mantle. + // curve at the midpoint. This prevents pops when mantling an object lower than the animated mantle. const FTransform& LerpedTarget = - UKismetMathLibrary::TLerp(UALSMathLibrary::TransfromAdd(MantleTarget, MantleActualStartOffset), ResultLerp, + UKismetMathLibrary::TLerp(UALSMathLibrary::TransformAdd(MantleTarget, MantleActualStartOffset), ResultLerp, BlendIn); // Step 4: Set the actors location and rotation to the Lerped Target. diff --git a/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h b/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h index 6ffe0112..faa8be1e 100644 --- a/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h +++ b/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h @@ -43,7 +43,7 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter virtual void Tick(float DeltaTime) override; virtual void BeginPlay() override; - + virtual void PostInitializeComponents() override; virtual void GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const override; @@ -209,7 +209,7 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Character States") void Server_SetDesiredRotationMode(EALSRotationMode NewRotMode); - + /** Rotation System */ UFUNCTION(BlueprintCallable, Category = "ALS|Rotation System") @@ -219,7 +219,7 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter UFUNCTION(BlueprintGetter, Category = "ALS|Movement System") bool HasMovementInput() const { return bHasMovementInput; } - + UFUNCTION(BlueprintCallable, Category = "ALS|Movement System") FALSMovementSettings GetTargetMovementSettings() const; @@ -247,7 +247,7 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter UAnimMontage* GetRollAnimation(); /** Utility */ - + UFUNCTION(BlueprintCallable, Category = "ALS|Utility") float GetAnimCurveValue(FName CurveName) const; @@ -287,22 +287,22 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter UFUNCTION(BlueprintGetter, Category = "ALS|Essential Information") bool IsMoving() const { return bIsMoving; } - + UFUNCTION(BlueprintCallable, Category = "ALS|Essential Information") FVector GetMovementInput() const; UFUNCTION(BlueprintGetter, Category = "ALS|Essential Information") float GetMovementInputAmount() const { return MovementInputAmount; } - + UFUNCTION(BlueprintGetter, Category = "ALS|Essential Information") float GetSpeed() const { return Speed; } - + UFUNCTION(BlueprintCallable, Category = "ALS|Essential Information") FRotator GetAimingRotation() const { return AimingRotation; } UFUNCTION(BlueprintGetter, Category = "ALS|Essential Information") float GetAimYawRate() const { return AimYawRate; } - + /** Input */ UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ALS|Input") @@ -441,7 +441,7 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter UPROPERTY(EditDefaultsOnly, Category = "ALS|Input", BlueprintReadOnly) float RollDoubleTapTimeout = 0.3f; - + UPROPERTY(Category = "ALS|Input", BlueprintReadOnly) bool bBreakFall = false; @@ -602,13 +602,13 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter FVector PreviousVelocity = FVector::ZeroVector; float PreviousAimYaw = 0.0f; - + UPROPERTY(BlueprintReadOnly, Category = "ALS|Camera") TObjectPtr CameraBehavior; /** Last time the 'first' crouch/roll button is pressed */ float LastStanceInputTime = 0.0f; - + /* Timer to manage reset of braking friction factor after on landed event */ FTimerHandle OnLandedFrictionResetTimer; diff --git a/Source/ALSV4_CPP/Public/Character/ALSCharacterMovementComponent.h b/Source/ALSV4_CPP/Public/Character/ALSCharacterMovementComponent.h index f0f4017e..7689a465 100644 --- a/Source/ALSV4_CPP/Public/Character/ALSCharacterMovementComponent.h +++ b/Source/ALSV4_CPP/Public/Character/ALSCharacterMovementComponent.h @@ -62,7 +62,7 @@ class ALSV4_CPP_API UALSCharacterMovementComponent : public UCharacterMovementCo UPROPERTY(BlueprintReadOnly, Category = "ALS|Movement System") FALSMovementSettings CurrentMovementSettings; - + // Set Movement Curve (Called in every instance) float GetMappedSpeed() const; diff --git a/Source/ALSV4_CPP/Public/Character/ALSPlayerController.h b/Source/ALSV4_CPP/Public/Character/ALSPlayerController.h index d7dabcc9..1b80fc20 100644 --- a/Source/ALSV4_CPP/Public/Character/ALSPlayerController.h +++ b/Source/ALSV4_CPP/Public/Character/ALSPlayerController.h @@ -30,7 +30,7 @@ class ALSV4_CPP_API AALSPlayerController : public APlayerController protected: void SetupInputs(); - + void SetupCamera(); UFUNCTION() @@ -99,7 +99,7 @@ class ALSV4_CPP_API AALSPlayerController : public APlayerController UFUNCTION() void DebugFocusedCharacterCycleAction(const FInputActionValue& Value); - + UFUNCTION() void DebugToggleMeshAction(const FInputActionValue& Value); @@ -108,7 +108,7 @@ class ALSV4_CPP_API AALSPlayerController : public APlayerController UFUNCTION() void DebugOverlayMenuCycleAction(const FInputActionValue& Value); - + public: /** Main character reference */ UPROPERTY(BlueprintReadOnly, Category = "ALS") diff --git a/Source/ALSV4_CPP/Public/Character/Animation/ALSCharacterAnimInstance.h b/Source/ALSV4_CPP/Public/Character/Animation/ALSCharacterAnimInstance.h index bbc14a00..a4afa5ac 100644 --- a/Source/ALSV4_CPP/Public/Character/Animation/ALSCharacterAnimInstance.h +++ b/Source/ALSV4_CPP/Public/Character/Animation/ALSCharacterAnimInstance.h @@ -48,7 +48,7 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance void OnPivot(); protected: - + UFUNCTION(BlueprintCallable, Category = "ALS|Grounded") void SetTrackedHipsDirection(EALSHipsDirection HipsDirection) { @@ -60,7 +60,7 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance { GroundedEntryState = NewState; } - + /** Enable Movement Animations if IsMoving and HasMovementInput, or if the Speed is greater than 150. */ UFUNCTION(BlueprintCallable, Category = "ALS|Grounded") bool ShouldMoveCheck() const; @@ -168,7 +168,7 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Read Only Data|Character Information", Meta = ( ShowOnlyInnerProperties)) FALSAnimCharacterInformation CharacterInformation; - + UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Read Only Data|Character Information") FALSMovementState MovementState = EALSMovementState::None; @@ -186,12 +186,12 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Read Only Data|Character Information") FALSOverlayState OverlayState = EALSOverlayState::Default; - + /** Anim Graph - Grounded */ UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Read Only Data|Anim Graph - Grounded", Meta = ( ShowOnlyInnerProperties)) FALSAnimGraphGrounded Grounded; - + UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Read Only Data|Anim Graph - Grounded") FALSVelocityBlend VelocityBlend; @@ -206,7 +206,7 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Read Only Data|Anim Graph - Grounded") FALSMovementDirection MovementDirection = EALSMovementDirection::Forward; - + /** Anim Graph - In Air */ UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Read Only Data|Anim Graph - In Air", Meta = ( ShowOnlyInnerProperties)) @@ -216,10 +216,10 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Read Only Data|Anim Graph - Aiming Values", Meta = ( ShowOnlyInnerProperties)) FALSAnimGraphAimingValues AimingValues; - + UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Read Only Data|Anim Graph - Aiming Values") FVector2D SmoothedAimingAngle = FVector2D::ZeroVector; - + /** Anim Graph - Ragdoll */ UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Read Only Data|Anim Graph - Ragdoll") float FlailRate = 0.0f; @@ -284,7 +284,7 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance /** IK Bone Names */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Configuration|Anim Graph - Foot IK") FName IkFootL_BoneName = FName(TEXT("ik_foot_l")); - + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Configuration|Anim Graph - Foot IK") FName IkFootR_BoneName = FName(TEXT("ik_foot_r")); diff --git a/Source/ALSV4_CPP/Public/Components/ALSDebugComponent.h b/Source/ALSV4_CPP/Public/Components/ALSDebugComponent.h index 7f75280e..745530a5 100644 --- a/Source/ALSV4_CPP/Public/Components/ALSDebugComponent.h +++ b/Source/ALSV4_CPP/Public/Components/ALSDebugComponent.h @@ -19,8 +19,8 @@ class ALSV4_CPP_API UALSDebugComponent : public UActorComponent public: UALSDebugComponent(); - - void BeginPlay() override; + + virtual void BeginPlay() override; UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "ALS|Debug") void OnPlayerControllerInitialized(APlayerController* Controller); @@ -90,7 +90,7 @@ class ALSV4_CPP_API UALSDebugComponent : public UActorComponent UFUNCTION(BlueprintCallable, Category = "ALS|Debug") bool GetShowLayerColors() { return bShowLayerColors; } - + UFUNCTION(BlueprintCallable, Category = "ALS|Debug") void FocusedDebugCharacterCycle(bool bValue); @@ -148,7 +148,7 @@ class ALSV4_CPP_API UALSDebugComponent : public UActorComponent UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "ALS|Debug") TObjectPtr DebugSkeletalMesh = nullptr; - + UPROPERTY(BlueprintReadOnly, Category = "ALS|Debug") TArray> AvailableDebugCharacters; @@ -169,9 +169,8 @@ class ALSV4_CPP_API UALSDebugComponent : public UActorComponent UPROPERTY() TObjectPtr DefaultSkeletalMesh = nullptr; - + /// Stores the index, which is used to select the next focused debug ALSBaseCharacter. /// If no characters where found during BeginPlay the value should be set to INDEX_NONE. int32 FocusedDebugCharacterIndex = INDEX_NONE; }; - diff --git a/Source/ALSV4_CPP/Public/Components/ALSMantleComponent.h b/Source/ALSV4_CPP/Public/Components/ALSMantleComponent.h index a79719cb..6113b6fc 100644 --- a/Source/ALSV4_CPP/Public/Components/ALSMantleComponent.h +++ b/Source/ALSV4_CPP/Public/Components/ALSMantleComponent.h @@ -48,7 +48,7 @@ class ALSV4_CPP_API UALSMantleComponent : public UActorComponent FALSMantleAsset GetMantleAsset(EALSMantleType MantleType, EALSOverlayState CurrentOverlayState); protected: - virtual void TickComponent(float DeltaTime, ELevelTick TickType, + virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; // Called when the game starts diff --git a/Source/ALSV4_CPP/Public/Library/ALSMathLibrary.h b/Source/ALSV4_CPP/Public/Library/ALSMathLibrary.h index 8546dad9..6436cbf2 100644 --- a/Source/ALSV4_CPP/Public/Library/ALSMathLibrary.h +++ b/Source/ALSV4_CPP/Public/Library/ALSMathLibrary.h @@ -25,14 +25,14 @@ class ALSV4_CPP_API UALSMathLibrary : public UBlueprintFunctionLibrary static FTransform MantleComponentLocalToWorld(const FALSComponentAndTransform& CompAndTransform); UFUNCTION(BlueprintCallable, Category = "ALS|Math Utils") - static FTransform TransfromSub(const FTransform& T1, const FTransform& T2) + static FTransform TransformSub(const FTransform& T1, const FTransform& T2) { return FTransform(T1.GetRotation().Rotator() - T2.GetRotation().Rotator(), T1.GetLocation() - T2.GetLocation(), T1.GetScale3D() - T2.GetScale3D()); } UFUNCTION(BlueprintCallable, Category = "ALS|Math Utils") - static FTransform TransfromAdd(const FTransform& T1, const FTransform& T2) + static FTransform TransformAdd(const FTransform& T1, const FTransform& T2) { return FTransform(T1.GetRotation().Rotator() + T2.GetRotation().Rotator(), T1.GetLocation() + T2.GetLocation(), T1.GetScale3D() + T2.GetScale3D()); From edaf91880753ed745f2e58c85008b08b9e2f1301 Mon Sep 17 00:00:00 2001 From: Guy Lundvall Date: Mon, 21 Mar 2022 23:46:10 -0700 Subject: [PATCH 04/10] Redundant qualifier removal --- .../Private/Components/ALSDebugComponent.cpp | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp b/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp index 00fe5f8c..a83675bb 100644 --- a/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp +++ b/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp @@ -225,14 +225,14 @@ void UALSDebugComponent::DrawDebugLineTraceSingle(const UWorld* World, if (bHit && OutHit.bBlockingHit) { // Red up to the blocking hit, green thereafter - ::DrawDebugLine(World, Start, OutHit.ImpactPoint, TraceColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugLine(World, OutHit.ImpactPoint, End, TraceHitColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugPoint(World, OutHit.ImpactPoint, 16.0f, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugLine(World, Start, OutHit.ImpactPoint, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugLine(World, OutHit.ImpactPoint, End, TraceHitColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugPoint(World, OutHit.ImpactPoint, 16.0f, TraceColor.ToFColor(true), bPersistent, LifeTime); } else { // no hit means all red - ::DrawDebugLine(World, Start, End, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugLine(World, Start, End, TraceColor.ToFColor(true), bPersistent, LifeTime); } } } @@ -256,20 +256,20 @@ void UALSDebugComponent::DrawDebugCapsuleTraceSingle(const UWorld* World, if (bHit && OutHit.bBlockingHit) { // Red up to the blocking hit, green thereafter - ::DrawDebugCapsule(World, Start, CollisionShape.GetCapsuleHalfHeight(), CollisionShape.GetCapsuleRadius(), FQuat::Identity, TraceColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugCapsule(World, OutHit.Location, CollisionShape.GetCapsuleHalfHeight(), CollisionShape.GetCapsuleRadius(), FQuat::Identity, TraceColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugLine(World, Start, OutHit.Location, TraceColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugPoint(World, OutHit.ImpactPoint, 16.0f, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugCapsule(World, Start, CollisionShape.GetCapsuleHalfHeight(), CollisionShape.GetCapsuleRadius(), FQuat::Identity, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugCapsule(World, OutHit.Location, CollisionShape.GetCapsuleHalfHeight(), CollisionShape.GetCapsuleRadius(), FQuat::Identity, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugLine(World, Start, OutHit.Location, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugPoint(World, OutHit.ImpactPoint, 16.0f, TraceColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugCapsule(World, End, CollisionShape.GetCapsuleHalfHeight(), CollisionShape.GetCapsuleRadius(), FQuat::Identity, TraceHitColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugLine(World, OutHit.Location, End, TraceHitColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugCapsule(World, End, CollisionShape.GetCapsuleHalfHeight(), CollisionShape.GetCapsuleRadius(), FQuat::Identity, TraceHitColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugLine(World, OutHit.Location, End, TraceHitColor.ToFColor(true), bPersistent, LifeTime); } else { // no hit means all red - ::DrawDebugCapsule(World, Start, CollisionShape.GetCapsuleHalfHeight(), CollisionShape.GetCapsuleRadius(), FQuat::Identity, TraceColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugCapsule(World, End, CollisionShape.GetCapsuleHalfHeight(), CollisionShape.GetCapsuleRadius(), FQuat::Identity, TraceColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugLine(World, Start, End, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugCapsule(World, Start, CollisionShape.GetCapsuleHalfHeight(), CollisionShape.GetCapsuleRadius(), FQuat::Identity, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugCapsule(World, End, CollisionShape.GetCapsuleHalfHeight(), CollisionShape.GetCapsuleRadius(), FQuat::Identity, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugLine(World, Start, End, TraceColor.ToFColor(true), bPersistent, LifeTime); } } } @@ -290,7 +290,7 @@ static void DrawDebugSweptSphere(const UWorld* InWorld, float const HalfHeight = (Dist * 0.5f) + Radius; FQuat const CapsuleRot = FRotationMatrix::MakeFromZ(TraceVec).ToQuat(); - ::DrawDebugCapsule(InWorld, Center, HalfHeight, Radius, CapsuleRot, Color, bPersistentLines, LifeTime, DepthPriority); + DrawDebugCapsule(InWorld, Center, HalfHeight, Radius, CapsuleRot, Color, bPersistentLines, LifeTime, DepthPriority); } void UALSDebugComponent::DrawDebugSphereTraceSingle(const UWorld* World, @@ -312,14 +312,14 @@ void UALSDebugComponent::DrawDebugSphereTraceSingle(const UWorld* World, if (bHit && OutHit.bBlockingHit) { // Red up to the blocking hit, green thereafter - ::DrawDebugSweptSphere(World, Start, OutHit.Location, CollisionShape.GetSphereRadius(), TraceColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugSweptSphere(World, OutHit.Location, End, CollisionShape.GetSphereRadius(), TraceHitColor.ToFColor(true), bPersistent, LifeTime); - ::DrawDebugPoint(World, OutHit.ImpactPoint, 16.0f, TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugSweptSphere(World, Start, OutHit.Location, CollisionShape.GetSphereRadius(), TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugSweptSphere(World, OutHit.Location, End, CollisionShape.GetSphereRadius(), TraceHitColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugPoint(World, OutHit.ImpactPoint, 16.0f, TraceColor.ToFColor(true), bPersistent, LifeTime); } else { // no hit means all red - ::DrawDebugSweptSphere(World, Start, End, CollisionShape.GetSphereRadius(), TraceColor.ToFColor(true), bPersistent, LifeTime); + DrawDebugSweptSphere(World, Start, End, CollisionShape.GetSphereRadius(), TraceColor.ToFColor(true), bPersistent, LifeTime); } } -} +} \ No newline at end of file From 91444a87b5b59a12f25597db31a5cdd5ea8e3e85 Mon Sep 17 00:00:00 2001 From: Guy Lundvall Date: Mon, 21 Mar 2022 23:51:29 -0700 Subject: [PATCH 05/10] More typos --- .../Animation/ALSCharacterAnimInstance.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp index 3f18af12..76fdd84c 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp @@ -509,7 +509,7 @@ void UALSCharacterAnimInstance::SetFootOffsets(float DeltaSeconds, FName EnableF FVector ImpactNormal = HitResult.ImpactNormal; // Step 1.1: Find the difference in location from the Impact point and the expected (flat) floor location. - // These values are offset by the nomrmal multiplied by the + // These values are offset by the normal multiplied by the // foot height to get better behavior on angled surfaces. CurLocationTarget = (ImpactPoint + ImpactNormal * Config.FootHeight) - (IKFootFloorLoc + FVector(0, 0, Config.FootHeight)); @@ -549,7 +549,7 @@ void UALSCharacterAnimInstance::TurnInPlaceCheck(float DeltaSeconds) { // Step 1: Check if Aiming angle is outside of the Turn Check Min Angle, and if the Aim Yaw Rate is below the Aim Yaw Rate Limit. // If so, begin counting the Elapsed Delay Time. If not, reset the Elapsed Delay Time. - // This ensures the conditions remain true for a sustained peroid of time before turning in place. + // This ensures the conditions remain true for a sustained period of time before turning in place. if (FMath::Abs(AimingValues.AimingAngle.X) <= TurnInPlaceValues.TurnCheckMinAngle || CharacterInformation.AimYawRate >= TurnInPlaceValues.AimYawRateLimit) { @@ -646,7 +646,7 @@ void UALSCharacterAnimInstance::UpdateRotationValues() // Set the Movement Direction MovementDirection = CalculateMovementDirection(); - // Set the Yaw Offsets. These values influence the "YawOffset" curve in the animgraph and are used to offset + // Set the Yaw Offsets. These values influence the "YawOffset" curve in the AnimGraph and are used to offset // the characters rotation for more natural movement. The curves allow for fine control over how the offset // behaves for each movement direction. FRotator Delta = CharacterInformation.Velocity.ToOrientationRotator() - CharacterInformation.AimingRotation; @@ -764,7 +764,7 @@ float UALSCharacterAnimInstance::CalculateStandingPlayRate() const float UALSCharacterAnimInstance::CalculateDiagonalScaleAmount() const { - // Calculate the Diagnal Scale Amount. This value is used to scale the Foot IK Root bone to make the Foot IK bones + // Calculate the Diagonal Scale Amount. This value is used to scale the Foot IK Root bone to make the Foot IK bones // cover more distance on the diagonal blends. Without scaling, the feet would not move far enough on the diagonal // direction due to the linear translational blending of the IK bones. The curve is used to easily map the value. return DiagonalScaleAmountCurve->GetFloatValue(FMath::Abs(VelocityBlend.F + VelocityBlend.B)); @@ -773,7 +773,7 @@ float UALSCharacterAnimInstance::CalculateDiagonalScaleAmount() const float UALSCharacterAnimInstance::CalculateCrouchingPlayRate() const { // Calculate the Crouching Play Rate by dividing the Character's speed by the Animated Speed. - // This value needs to be separate from the standing play rate to improve the blend from crocuh to stand while in motion. + // This value needs to be separate from the standing play rate to improve the blend from crouch to stand while in motion. return FMath::Clamp( CharacterInformation.Speed / Config.AnimatedCrouchSpeed / Grounded.StrideBlend / GetOwningComponent()-> GetComponentScale().Z, @@ -853,7 +853,7 @@ FALSLeanAmount UALSCharacterAnimInstance::CalculateAirLeanAmount() const EALSMovementDirection UALSCharacterAnimInstance::CalculateMovementDirection() const { // Calculate the Movement Direction. This value represents the direction the character is moving relative to the camera - // during the Looking Cirection / Aiming rotation modes, and is used in the Cycle Blending Anim Layers to blend to the + // during the Looking Direction / Aiming rotation modes, and is used in the Cycle Blending Anim Layers to blend to the // appropriate directional states. if (Gait.Sprinting() || RotationMode.VelocityDirection()) { @@ -914,7 +914,7 @@ void UALSCharacterAnimInstance::TurnInPlace(FRotator TargetRotation, float PlayR PlaySlotAnimationAsDynamicMontage(TargetTurnAsset.Animation, TargetTurnAsset.SlotName, 0.2f, 0.2f, TargetTurnAsset.PlayRate * PlayRateScale, 1, 0.0f, StartTime); - // Step 4: Scale the rotation amount (gets scaled in animgraph) to compensate for turn angle (If Allowed) and play rate. + // Step 4: Scale the rotation amount (gets scaled in AnimGraph) to compensate for turn angle (If Allowed) and play rate. if (TargetTurnAsset.ScaleTurnAngle) { Grounded.RotationScale = (TurnAngle / TargetTurnAsset.AnimatedAngle) * TargetTurnAsset.PlayRate * PlayRateScale; From bec249bd75da1f2480e217a98a443523a9ecb6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fa=20Can=20Yan=C4=B1ko=C4=9Flu?= Date: Tue, 22 Mar 2022 11:47:50 +0300 Subject: [PATCH 06/10] Fix incorrect conditions in CalculateQuadrant --- Source/ALSV4_CPP/Private/Library/ALSMathLibrary.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/ALSV4_CPP/Private/Library/ALSMathLibrary.cpp b/Source/ALSV4_CPP/Private/Library/ALSMathLibrary.cpp index 1a90f4e5..0872ca74 100644 --- a/Source/ALSV4_CPP/Private/Library/ALSMathLibrary.cpp +++ b/Source/ALSV4_CPP/Private/Library/ALSMathLibrary.cpp @@ -88,19 +88,19 @@ EALSMovementDirection UALSMathLibrary::CalculateQuadrant(EALSMovementDirection C // Take the input angle and determine its quadrant (direction). Use the current Movement Direction to increase or // decrease the buffers on the angle ranges for each quadrant. if (AngleInRange(Angle, FLThreshold, FRThreshold, Buffer, - Current != EALSMovementDirection::Forward || Current != EALSMovementDirection::Backward)) + Current != EALSMovementDirection::Forward && Current != EALSMovementDirection::Backward)) { return EALSMovementDirection::Forward; } if (AngleInRange(Angle, FRThreshold, BRThreshold, Buffer, - Current != EALSMovementDirection::Right || Current != EALSMovementDirection::Left)) + Current != EALSMovementDirection::Right && Current != EALSMovementDirection::Left)) { return EALSMovementDirection::Right; } if (AngleInRange(Angle, BLThreshold, FLThreshold, Buffer, - Current != EALSMovementDirection::Right || Current != EALSMovementDirection::Left)) + Current != EALSMovementDirection::Right && Current != EALSMovementDirection::Left)) { return EALSMovementDirection::Left; } From 8b19387b485831becc669f13ea44914e13d47196 Mon Sep 17 00:00:00 2001 From: Guy Lundvall Date: Tue, 22 Mar 2022 17:15:34 -0700 Subject: [PATCH 07/10] One more typo Fix leftover comment from when mantling was part of BaseCharacter --- Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp b/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp index f740749f..607cc057 100644 --- a/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp +++ b/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp @@ -307,7 +307,7 @@ void UALSMantleComponent::Multicast_MantleStart_Implementation(float MantleHeigh } } -// This function is called by "MantleTimeline" using BindUFunction in the AALSBaseCharacter::BeginPlay during the default settings initialization. +// This function is called by "MantleTimeline" using BindUFunction in UALSMantleComponent::BeginPlay during the default settings initialization. void UALSMantleComponent::MantleUpdate(float BlendIn) { if (!OwnerCharacter) From d3cbccfd1b20fa58cf249691103f86b03fc17ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fa=20Can=20Yan=C4=B1ko=C4=9Flu?= Date: Sun, 17 Apr 2022 18:35:24 +0300 Subject: [PATCH 08/10] Fix packaging errors --- .../Private/Character/Animation/ALSCharacterAnimInstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp index 76fdd84c..4da490e0 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp @@ -47,7 +47,7 @@ void UALSCharacterAnimInstance::NativeInitializeAnimation() Character = Cast(TryGetPawnOwner()); if (Character) { - Character->OnJumpedDelegate.AddDynamic(this, &UALSCharacterAnimInstance::OnJumped); + Character->OnJumpedDelegate.AddDynamicUnique(this, &UALSCharacterAnimInstance::OnJumped); } } From 9f1bf64299c452ae934d2b72a607e54071e0ad70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fa=20Can=20Yan=C4=B1ko=C4=9Flu?= Date: Sun, 17 Apr 2022 18:36:48 +0300 Subject: [PATCH 09/10] Fix typo from previous commit --- .../Private/Character/Animation/ALSCharacterAnimInstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp index 4da490e0..11a44ff6 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp @@ -47,7 +47,7 @@ void UALSCharacterAnimInstance::NativeInitializeAnimation() Character = Cast(TryGetPawnOwner()); if (Character) { - Character->OnJumpedDelegate.AddDynamicUnique(this, &UALSCharacterAnimInstance::OnJumped); + Character->OnJumpedDelegate.AddUniqueDynamic(this, &UALSCharacterAnimInstance::OnJumped); } } From 906bb307f0e9e71e1319ad57d6fcbe6d265f3c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fa=20Can=20Yan=C4=B1ko=C4=9Flu?= Date: Tue, 19 Apr 2022 20:10:58 +0300 Subject: [PATCH 10/10] Bump plugin version --- ALSV4_CPP.uplugin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALSV4_CPP.uplugin b/ALSV4_CPP.uplugin index 09e7ff87..7b42cc89 100644 --- a/ALSV4_CPP.uplugin +++ b/ALSV4_CPP.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, "Version": 1, - "VersionName": "4.23.2", + "VersionName": "4.23.3", "FriendlyName": "Advanced Locomotion System Community", "Description": "Performance optimized community version of LongmireLocomotion's Advanced Locomotion System V4", "Category": "Animation",