Skip to content

Commit 81014e8

Browse files
authored
Merge pull request #221 from dyanikoglu/dev
Hotfix v4.20.1
2 parents 86d606c + 06613da commit 81014e8

File tree

5 files changed

+11
-23
lines changed

5 files changed

+11
-23
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.20",
4+
"VersionName": "4.20.1",
55
"FriendlyName": "Advanced Locomotion System Community",
66
"Description": "Performance optimized community version of LongmireLocomotion's Advanced Locomotion System V4",
77
"Category": "Animation",
4 Bytes
Binary file not shown.

Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ void AALSBaseCharacter::BeginPlay()
154154
MainAnimInstance->SetRootMotionMode(ERootMotionMode::IgnoreRootMotion);
155155
}
156156

157+
MyCharacterMovementComponent->SetMovementSettings(GetTargetMovementSettings());
158+
157159
DebugComponent = FindComponentByClass<UALSDebugComponent>();
158160
}
159161

@@ -877,6 +879,8 @@ void AALSBaseCharacter::OnStanceChanged(const EALSStance PreviousStance)
877879
{
878880
CameraBehavior->Stance = Stance;
879881
}
882+
883+
MyCharacterMovementComponent->SetMovementSettings(GetTargetMovementSettings());
880884
}
881885

882886
void AALSBaseCharacter::OnRotationModeChanged(EALSRotationMode PreviousRotationMode)
@@ -893,6 +897,8 @@ void AALSBaseCharacter::OnRotationModeChanged(EALSRotationMode PreviousRotationM
893897
{
894898
CameraBehavior->SetRotationMode(RotationMode);
895899
}
900+
901+
MyCharacterMovementComponent->SetMovementSettings(GetTargetMovementSettings());
896902
}
897903

898904
void AALSBaseCharacter::OnGaitChanged(const EALSGait PreviousGait)
@@ -1074,9 +1080,6 @@ void AALSBaseCharacter::UpdateCharacterMovement()
10741080
SetGait(ActualGait);
10751081
}
10761082

1077-
// Get the Current Movement Settings and pass it through to the movement component.
1078-
MyCharacterMovementComponent->SetMovementSettings(GetTargetMovementSettings());
1079-
10801083
// Update the Character Max Walk Speed to the configured speeds based on the currently Allowed Gait.
10811084
MyCharacterMovementComponent->SetAllowedGait(AllowedGait);
10821085
}

Source/ALSV4_CPP/Private/Character/ALSCharacterMovementComponent.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ void UALSCharacterMovementComponent::SetMovementSettings(FALSMovementSettings Ne
183183
{
184184
// Set the current movement settings from the owner
185185
CurrentMovementSettings = NewMovementSettings;
186+
bRequestMovementSettingsChange = true;
186187
}
187188

188189
void UALSCharacterMovementComponent::SetAllowedGait(EALSGait NewAllowedGait)

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

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include "Components/AudioComponent.h"
1212
#include "Engine/DataTable.h"
13+
#include "Kismet/KismetSystemLibrary.h"
1314
#include "Library/ALSCharacterStructLibrary.h"
1415
#include "PhysicalMaterials/PhysicalMaterial.h"
1516
#include "NiagaraSystem.h"
@@ -46,25 +47,8 @@ void UALSAnimNotifyFootstep::Notify(USkeletalMeshComponent* MeshComp, UAnimSeque
4647

4748
FHitResult Hit;
4849

49-
ECollisionChannel CollisionChannel = UEngineTypes::ConvertToCollisionChannel(TraceChannel);
50-
51-
FCollisionQueryParams Params(SCENE_QUERY_STAT(ALSFootstep), true /*bTraceComplex*/, MeshOwner);
52-
Params.bReturnPhysicalMaterial = true;
53-
for (auto& Child : MeshOwner->Children)
54-
{
55-
Params.AddIgnoredActor(Child);
56-
}
57-
58-
bool const bHit = MeshComp->GetWorld() ? World->LineTraceSingleByChannel(Hit, FootLocation, TraceEnd, CollisionChannel, Params) : false;
59-
60-
#if ENABLE_DRAW_DEBUG
61-
if (MeshComp->GetWorld())
62-
{
63-
DrawDebugLineTraceSingle(MeshComp->GetWorld(), FootLocation, TraceEnd, DrawDebugType, bHit, Hit, TraceColor, TraceHitColor, DrawTime);
64-
}
65-
#endif
66-
67-
if (bHit)
50+
if (UKismetSystemLibrary::LineTraceSingle(MeshOwner /*used by bIgnoreSelf*/, FootLocation, TraceEnd, TraceChannel, true /*bTraceComplex*/, MeshOwner->Children,
51+
DrawDebugType, Hit, true /*bIgnoreSelf*/))
6852
{
6953
if (!Hit.PhysMaterial.Get())
7054
{

0 commit comments

Comments
 (0)