Skip to content

Commit

Permalink
Merge pull request #221 from dyanikoglu/dev
Browse files Browse the repository at this point in the history
Hotfix v4.20.1
  • Loading branch information
dyanikoglu authored May 19, 2021
2 parents 86d606c + 06613da commit 81014e8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 23 deletions.
2 changes: 1 addition & 1 deletion ALSV4_CPP.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "4.20",
"VersionName": "4.20.1",
"FriendlyName": "Advanced Locomotion System Community",
"Description": "Performance optimized community version of LongmireLocomotion's Advanced Locomotion System V4",
"Category": "Animation",
Expand Down
Binary file modified Content/AdvancedLocomotionV4/Blueprints/UI/ALS_HUD.uasset
Binary file not shown.
9 changes: 6 additions & 3 deletions Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ void AALSBaseCharacter::BeginPlay()
MainAnimInstance->SetRootMotionMode(ERootMotionMode::IgnoreRootMotion);
}

MyCharacterMovementComponent->SetMovementSettings(GetTargetMovementSettings());

DebugComponent = FindComponentByClass<UALSDebugComponent>();
}

Expand Down Expand Up @@ -877,6 +879,8 @@ void AALSBaseCharacter::OnStanceChanged(const EALSStance PreviousStance)
{
CameraBehavior->Stance = Stance;
}

MyCharacterMovementComponent->SetMovementSettings(GetTargetMovementSettings());
}

void AALSBaseCharacter::OnRotationModeChanged(EALSRotationMode PreviousRotationMode)
Expand All @@ -893,6 +897,8 @@ void AALSBaseCharacter::OnRotationModeChanged(EALSRotationMode PreviousRotationM
{
CameraBehavior->SetRotationMode(RotationMode);
}

MyCharacterMovementComponent->SetMovementSettings(GetTargetMovementSettings());
}

void AALSBaseCharacter::OnGaitChanged(const EALSGait PreviousGait)
Expand Down Expand Up @@ -1074,9 +1080,6 @@ void AALSBaseCharacter::UpdateCharacterMovement()
SetGait(ActualGait);
}

// Get the Current Movement Settings and pass it through to the movement component.
MyCharacterMovementComponent->SetMovementSettings(GetTargetMovementSettings());

// Update the Character Max Walk Speed to the configured speeds based on the currently Allowed Gait.
MyCharacterMovementComponent->SetAllowedGait(AllowedGait);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ void UALSCharacterMovementComponent::SetMovementSettings(FALSMovementSettings Ne
{
// Set the current movement settings from the owner
CurrentMovementSettings = NewMovementSettings;
bRequestMovementSettingsChange = true;
}

void UALSCharacterMovementComponent::SetAllowedGait(EALSGait NewAllowedGait)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "Components/AudioComponent.h"
#include "Engine/DataTable.h"
#include "Kismet/KismetSystemLibrary.h"
#include "Library/ALSCharacterStructLibrary.h"
#include "PhysicalMaterials/PhysicalMaterial.h"
#include "NiagaraSystem.h"
Expand Down Expand Up @@ -46,25 +47,8 @@ void UALSAnimNotifyFootstep::Notify(USkeletalMeshComponent* MeshComp, UAnimSeque

FHitResult Hit;

ECollisionChannel CollisionChannel = UEngineTypes::ConvertToCollisionChannel(TraceChannel);

FCollisionQueryParams Params(SCENE_QUERY_STAT(ALSFootstep), true /*bTraceComplex*/, MeshOwner);
Params.bReturnPhysicalMaterial = true;
for (auto& Child : MeshOwner->Children)
{
Params.AddIgnoredActor(Child);
}

bool const bHit = MeshComp->GetWorld() ? World->LineTraceSingleByChannel(Hit, FootLocation, TraceEnd, CollisionChannel, Params) : false;

#if ENABLE_DRAW_DEBUG
if (MeshComp->GetWorld())
{
DrawDebugLineTraceSingle(MeshComp->GetWorld(), FootLocation, TraceEnd, DrawDebugType, bHit, Hit, TraceColor, TraceHitColor, DrawTime);
}
#endif

if (bHit)
if (UKismetSystemLibrary::LineTraceSingle(MeshOwner /*used by bIgnoreSelf*/, FootLocation, TraceEnd, TraceChannel, true /*bTraceComplex*/, MeshOwner->Children,
DrawDebugType, Hit, true /*bIgnoreSelf*/))
{
if (!Hit.PhysMaterial.Get())
{
Expand Down

0 comments on commit 81014e8

Please sign in to comment.