Skip to content

Commit f68a77e

Browse files
authored
Merge pull request #381 from dyanikoglu/dev
Hotfix v4.23.3
2 parents 9cb3622 + 906bb30 commit f68a77e

21 files changed

+101
-105
lines changed

ALSV4_CPP.uplugin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
33
"Version": 1,
4-
"VersionName": "4.23.2",
4+
"VersionName": "4.23.3",
55
"FriendlyName": "Advanced Locomotion System Community",
66
"Description": "Performance optimized community version of LongmireLocomotion's Advanced Locomotion System V4",
77
"Category": "Animation",

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Advanced Locomotion System Community
1+
# Advanced Locomotion System - Community Version
22
![image](https://github.com/dyanikoglu/ALS-Community/raw/main/Resources/Readme_Content_2.gif)
33

4-
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.
4+
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
55

66
<p align="center">
77
<a href="https://discord.gg/wYYMHFu"><img src="https://i.imgur.com/LP9bZQj.png"></a>
@@ -14,16 +14,14 @@ Replicated and optimized community version of [Advanced Locomotion System V4](ht
1414
*Mac, Android, IOS, and console builds are not tested and supported at the moment. Use the plugin on those platforms with your own risk.*
1515

1616
## Features
17-
- Based on latest marketplace release (V4) of Advanced Locomotion System
18-
- Fully implemented in C++
19-
- Full replication support with low bandwidth usage (Ragdoll replication is in experimental state)
20-
- Plugin structure
21-
- Animation Blueprint is optimized with new property binding feature
22-
- Inputs are handled with Enhanced Input System
23-
- Highly optimized for production
24-
- Mantling and debugging features are implemented as a separate actor components to reduce total overhead on base character class
25-
- Improved footstep behavior with Niagara particle & decal support
26-
- Lots of bug fixes additional to marketplace version
17+
- Fully implemented and optimized in C++. Implementation is based on latest marketplace release (V4) of ALS
18+
- Complete replication support with low bandwidth usage (Ragdoll replication is in experimental state)
19+
- Redesigned as plugin
20+
- Animation blueprint is optimized with new property binding feature
21+
- Player input is handled with new Enhanced Input Plugin
22+
- Mantling and debugging features are implemented as separate actor components to reduce total overhead on base character class
23+
- Improved footstep system with decal & Niagara particle support
24+
- Lots of additional bug fixes
2725

2826
## Known Issues & Discussion
2927
- See [Issues](https://github.com/dyanikoglu/ALS-Community/issues) section for list of known issues

Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void AALSBaseCharacter::Replicated_PlayMontage_Implementation(UAnimMontage* Mont
7575
{
7676
GetMesh()->GetAnimInstance()->Montage_Play(Montage, PlayRate);
7777
}
78-
78+
7979
Server_PlayMontage(Montage, PlayRate);
8080
}
8181

@@ -186,7 +186,7 @@ void AALSBaseCharacter::RagdollStart()
186186

187187
// Fixes character mesh is showing default A pose for a split-second just before ragdoll ends in listen server games
188188
GetMesh()->bOnlyAllowAutonomousTickPose = true;
189-
189+
190190
SetReplicateMovement(false);
191191
}
192192

@@ -653,7 +653,7 @@ void AALSBaseCharacter::GetCameraParameters(float& TPFOVOut, float& FPFOVOut, bo
653653
void AALSBaseCharacter::RagdollUpdate(float DeltaTime)
654654
{
655655
GetMesh()->bOnlyAllowAutonomousTickPose = false;
656-
656+
657657
// Set the Last Ragdoll Velocity.
658658
const FVector NewRagdollVel = GetMesh()->GetPhysicsLinearVelocity(NAME_root);
659659
LastRagdollVelocity = (NewRagdollVel != FVector::ZeroVector || IsLocallyControlled())
@@ -686,7 +686,7 @@ void AALSBaseCharacter::SetActorLocationDuringRagdoll(float DeltaTime)
686686
}
687687
}
688688

689-
// Determine wether the ragdoll is facing up or down and set the target rotation accordingly.
689+
// Determine whether the ragdoll is facing up or down and set the target rotation accordingly.
690690
const FRotator PelvisRot = GetMesh()->GetSocketRotation(NAME_Pelvis);
691691

692692
if (bReversedPelvis) {
@@ -1143,7 +1143,7 @@ EALSGait AALSBaseCharacter::GetActualGait(EALSGait AllowedGait) const
11431143
{
11441144
// Get the Actual Gait. This is calculated by the actual movement of the character, and so it can be different
11451145
// from the desired gait or allowed gait. For instance, if the Allowed Gait becomes walking,
1146-
// the Actual gait will still be running untill the character decelerates to the walking speed.
1146+
// the Actual gait will still be running until the character decelerates to the walking speed.
11471147

11481148
const float LocWalkSpeed = MyCharacterMovementComponent->CurrentMovementSettings.WalkSpeed;
11491149
const float LocRunSpeed = MyCharacterMovementComponent->CurrentMovementSettings.RunSpeed;

Source/ALSV4_CPP/Private/Character/ALSPlayerController.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void AALSPlayerController::OnPossess(APawn* NewPawn)
2525
}
2626

2727
SetupInputs();
28-
28+
2929
UALSDebugComponent* DebugComp = Cast<UALSDebugComponent>(PossessedCharacter->GetComponentByClass(UALSDebugComponent::StaticClass()));
3030
if (DebugComp)
3131
{
@@ -39,7 +39,7 @@ void AALSPlayerController::OnRep_Pawn()
3939
PossessedCharacter = Cast<AALSBaseCharacter>(GetPawn());
4040
SetupCamera();
4141
SetupInputs();
42-
42+
4343
UALSDebugComponent* DebugComp = Cast<UALSDebugComponent>(PossessedCharacter->GetComponentByClass(UALSDebugComponent::StaticClass()));
4444
if (DebugComp)
4545
{

Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void UALSCharacterAnimInstance::NativeInitializeAnimation()
4747
Character = Cast<AALSBaseCharacter>(TryGetPawnOwner());
4848
if (Character)
4949
{
50-
Character->OnJumpedDelegate.AddDynamic(this, &UALSCharacterAnimInstance::OnJumped);
50+
Character->OnJumpedDelegate.AddUniqueDynamic(this, &UALSCharacterAnimInstance::OnJumped);
5151
}
5252
}
5353

@@ -509,7 +509,7 @@ void UALSCharacterAnimInstance::SetFootOffsets(float DeltaSeconds, FName EnableF
509509
FVector ImpactNormal = HitResult.ImpactNormal;
510510

511511
// Step 1.1: Find the difference in location from the Impact point and the expected (flat) floor location.
512-
// These values are offset by the nomrmal multiplied by the
512+
// These values are offset by the normal multiplied by the
513513
// foot height to get better behavior on angled surfaces.
514514
CurLocationTarget = (ImpactPoint + ImpactNormal * Config.FootHeight) -
515515
(IKFootFloorLoc + FVector(0, 0, Config.FootHeight));
@@ -549,7 +549,7 @@ void UALSCharacterAnimInstance::TurnInPlaceCheck(float DeltaSeconds)
549549
{
550550
// 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.
551551
// If so, begin counting the Elapsed Delay Time. If not, reset the Elapsed Delay Time.
552-
// This ensures the conditions remain true for a sustained peroid of time before turning in place.
552+
// This ensures the conditions remain true for a sustained period of time before turning in place.
553553
if (FMath::Abs(AimingValues.AimingAngle.X) <= TurnInPlaceValues.TurnCheckMinAngle ||
554554
CharacterInformation.AimYawRate >= TurnInPlaceValues.AimYawRateLimit)
555555
{
@@ -646,7 +646,7 @@ void UALSCharacterAnimInstance::UpdateRotationValues()
646646
// Set the Movement Direction
647647
MovementDirection = CalculateMovementDirection();
648648

649-
// Set the Yaw Offsets. These values influence the "YawOffset" curve in the animgraph and are used to offset
649+
// Set the Yaw Offsets. These values influence the "YawOffset" curve in the AnimGraph and are used to offset
650650
// the characters rotation for more natural movement. The curves allow for fine control over how the offset
651651
// behaves for each movement direction.
652652
FRotator Delta = CharacterInformation.Velocity.ToOrientationRotator() - CharacterInformation.AimingRotation;
@@ -764,7 +764,7 @@ float UALSCharacterAnimInstance::CalculateStandingPlayRate() const
764764

765765
float UALSCharacterAnimInstance::CalculateDiagonalScaleAmount() const
766766
{
767-
// Calculate the Diagnal Scale Amount. This value is used to scale the Foot IK Root bone to make the Foot IK bones
767+
// Calculate the Diagonal Scale Amount. This value is used to scale the Foot IK Root bone to make the Foot IK bones
768768
// cover more distance on the diagonal blends. Without scaling, the feet would not move far enough on the diagonal
769769
// direction due to the linear translational blending of the IK bones. The curve is used to easily map the value.
770770
return DiagonalScaleAmountCurve->GetFloatValue(FMath::Abs(VelocityBlend.F + VelocityBlend.B));
@@ -773,7 +773,7 @@ float UALSCharacterAnimInstance::CalculateDiagonalScaleAmount() const
773773
float UALSCharacterAnimInstance::CalculateCrouchingPlayRate() const
774774
{
775775
// Calculate the Crouching Play Rate by dividing the Character's speed by the Animated Speed.
776-
// This value needs to be separate from the standing play rate to improve the blend from crocuh to stand while in motion.
776+
// This value needs to be separate from the standing play rate to improve the blend from crouch to stand while in motion.
777777
return FMath::Clamp(
778778
CharacterInformation.Speed / Config.AnimatedCrouchSpeed / Grounded.StrideBlend / GetOwningComponent()->
779779
GetComponentScale().Z,
@@ -784,7 +784,7 @@ float UALSCharacterAnimInstance::CalculateLandPrediction() const
784784
{
785785
// Calculate the land prediction weight by tracing in the velocity direction to find a walkable surface the character
786786
// is falling toward, and getting the 'Time' (range of 0-1, 1 being maximum, 0 being about to land) till impact.
787-
// The Land Prediction Curve is used to control how the time affects the final weight for a smooth blend.
787+
// The Land Prediction Curve is used to control how the time affects the final weight for a smooth blend.
788788
if (InAir.FallSpeed >= -200.0f)
789789
{
790790
return 0.0f;
@@ -853,7 +853,7 @@ FALSLeanAmount UALSCharacterAnimInstance::CalculateAirLeanAmount() const
853853
EALSMovementDirection UALSCharacterAnimInstance::CalculateMovementDirection() const
854854
{
855855
// Calculate the Movement Direction. This value represents the direction the character is moving relative to the camera
856-
// during the Looking Cirection / Aiming rotation modes, and is used in the Cycle Blending Anim Layers to blend to the
856+
// during the Looking Direction / Aiming rotation modes, and is used in the Cycle Blending Anim Layers to blend to the
857857
// appropriate directional states.
858858
if (Gait.Sprinting() || RotationMode.VelocityDirection())
859859
{
@@ -872,7 +872,7 @@ void UALSCharacterAnimInstance::TurnInPlace(FRotator TargetRotation, float PlayR
872872
FRotator Delta = TargetRotation - CharacterInformation.CharacterActorRotation;
873873
Delta.Normalize();
874874
const float TurnAngle = Delta.Yaw;
875-
875+
876876
// Step 2: Choose Turn Asset based on the Turn Angle and Stance
877877
FALSTurnInPlaceAsset TargetTurnAsset;
878878
if (Stance.Standing())
@@ -914,7 +914,7 @@ void UALSCharacterAnimInstance::TurnInPlace(FRotator TargetRotation, float PlayR
914914
PlaySlotAnimationAsDynamicMontage(TargetTurnAsset.Animation, TargetTurnAsset.SlotName, 0.2f, 0.2f,
915915
TargetTurnAsset.PlayRate * PlayRateScale, 1, 0.0f, StartTime);
916916

917-
// Step 4: Scale the rotation amount (gets scaled in animgraph) to compensate for turn angle (If Allowed) and play rate.
917+
// Step 4: Scale the rotation amount (gets scaled in AnimGraph) to compensate for turn angle (If Allowed) and play rate.
918918
if (TargetTurnAsset.ScaleTurnAngle)
919919
{
920920
Grounded.RotationScale = (TurnAngle / TargetTurnAsset.AnimatedAngle) * TargetTurnAsset.PlayRate * PlayRateScale;

Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyCameraShake.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright: Copyright (C) 2022 Doğa Can Yanıkoğlu
2-
// Source Code: https://github.com/dyanikoglu/ALS-Community
2+
// Source Code: https://github.com/dyanikoglu/ALS-Community
33

44

55
#include "Character/Animation/Notify/ALSAnimNotifyCameraShake.h"
@@ -8,7 +8,7 @@
88
void UALSAnimNotifyCameraShake::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
99
{
1010
Super::Notify(MeshComp, Animation, EventReference);
11-
11+
1212
APawn* OwnerPawn = Cast<APawn>(MeshComp->GetOwner());
1313
if (OwnerPawn)
1414
{

Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyFootstep.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ FName UALSAnimNotifyFootstep::NAME_Foot_R(TEXT("Foot_R"));
2222
void UALSAnimNotifyFootstep::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
2323
{
2424
Super::Notify(MeshComp, Animation, EventReference);
25-
25+
2626
if (!MeshComp)
2727
{
2828
return;
2929
}
30-
30+
3131
AActor* MeshOwner = MeshComp->GetOwner();
3232
if (!MeshOwner)
3333
{

Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyGroundedEntryState.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
void UALSAnimNotifyGroundedEntryState::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
1111
{
1212
Super::Notify(MeshComp, Animation, EventReference);
13-
13+
1414
AALSBaseCharacter* Character = Cast<AALSBaseCharacter>(MeshComp->GetOwner());
1515
if (Character)
1616
{

Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateEarlyBlendOut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void UALSNotifyStateEarlyBlendOut::NotifyTick(USkeletalMeshComponent* MeshComp,
1010
float FrameDeltaTime, const FAnimNotifyEventReference& EventReference)
1111
{
1212
Super::NotifyTick(MeshComp, Animation, FrameDeltaTime, EventReference);
13-
13+
1414
if (!MeshComp || !MeshComp->GetAnimInstance())
1515
{
1616
return;

Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSNotifyStateMovementAction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void UALSNotifyStateMovementAction::NotifyBegin(USkeletalMeshComponent* MeshComp
1010
float TotalDuration, const FAnimNotifyEventReference& EventReference)
1111
{
1212
Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference);
13-
13+
1414
AALSBaseCharacter* BaseCharacter = Cast<AALSBaseCharacter>(MeshComp->GetOwner());
1515
if (BaseCharacter)
1616
{
@@ -22,7 +22,7 @@ void UALSNotifyStateMovementAction::NotifyEnd(USkeletalMeshComponent* MeshComp,
2222
const FAnimNotifyEventReference& EventReference)
2323
{
2424
Super::NotifyEnd(MeshComp, Animation, EventReference);
25-
25+
2626
AALSBaseCharacter* BaseCharacter = Cast<AALSBaseCharacter>(MeshComp->GetOwner());
2727
if (BaseCharacter && BaseCharacter->GetMovementAction() == MovementAction)
2828
{

0 commit comments

Comments
 (0)