Skip to content

Commit

Permalink
Merge pull request #309 from dyanikoglu/dev
Browse files Browse the repository at this point in the history
Hotfix v4.21.2
  • Loading branch information
dyanikoglu authored Nov 9, 2021
2 parents 494911c + 281cc15 commit db5aa0b
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 52 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.21",
"VersionName": "4.21.2",
"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.
4 changes: 2 additions & 2 deletions Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void AALSBaseCharacter::BeginPlay()

MyCharacterMovementComponent->SetMovementSettings(GetTargetMovementSettings());

DebugComponent = FindComponentByClass<UALSDebugComponent>();
ALSDebugComponent = FindComponentByClass<UALSDebugComponent>();
}

void AALSBaseCharacter::PreInitializeComponents()
Expand Down Expand Up @@ -773,7 +773,7 @@ void AALSBaseCharacter::SetActorLocationDuringRagdoll(float DeltaTime)
const bool bHit = World->LineTraceSingleByChannel(HitResult, TargetRagdollLocation, TraceVect,
ECC_Visibility, Params);

if (DebugComponent && DebugComponent->GetShowTraces())
if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
UALSDebugComponent::DrawDebugLineTraceSingle(World,
TargetRagdollLocation,
Expand Down
4 changes: 2 additions & 2 deletions Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void AALSPlayerCameraManager::OnPossess(AALSBaseCharacter* NewCharacter)
SetActorLocation(TPSLoc);
SmoothedPivotTarget.SetLocation(TPSLoc);

DebugComponent = ControlledCharacter->FindComponentByClass<UALSDebugComponent>();
ALSDebugComponent = ControlledCharacter->FindComponentByClass<UALSDebugComponent>();
}

float AALSPlayerCameraManager::GetCameraBehaviorParam(FName CurveName) const
Expand Down Expand Up @@ -202,7 +202,7 @@ bool AALSPlayerCameraManager::CustomCameraBehavior(float DeltaTime, FVector& Loc
const bool bHit = World->SweepSingleByChannel(HitResult, TraceOrigin, TargetCameraLocation, FQuat::Identity,
TraceChannel, SphereCollisionShape, Params);

if (DebugComponent && DebugComponent->GetShowTraces())
if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
UALSDebugComponent::DrawDebugSphereTraceSingle(World,
TraceOrigin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,33 @@
#include "GameFramework/CharacterMovementComponent.h"


const FName NAME_BasePose_CLF(TEXT("BasePose_CLF"));
const FName NAME_BasePose_N(TEXT("BasePose_N"));
const FName NAME_Enable_FootIK_R(TEXT("Enable_FootIK_R"));
const FName NAME_Enable_FootIK_L(TEXT("Enable_FootIK_L"));
const FName NAME_Enable_HandIK_L(TEXT("Enable_HandIK_L"));
const FName NAME_Enable_HandIK_R(TEXT("Enable_HandIK_R"));
const FName NAME_Enable_Transition(TEXT("Enable_Transition"));
const FName NAME_FootLock_L(TEXT("FootLock_L"));
const FName NAME_FootLock_R(TEXT("FootLock_R"));
const FName NAME_Grounded___Slot(TEXT("Grounded Slot"));
const FName NAME_Layering_Arm_L(TEXT("Layering_Arm_L"));
const FName NAME_Layering_Arm_L_Add(TEXT("Layering_Arm_L_Add"));
const FName NAME_Layering_Arm_L_LS(TEXT("Layering_Arm_L_LS"));
const FName NAME_Layering_Arm_R(TEXT("Layering_Arm_R"));
const FName NAME_Layering_Arm_R_Add(TEXT("Layering_Arm_R_Add"));
const FName NAME_Layering_Arm_R_LS(TEXT("Layering_Arm_R_LS"));
const FName NAME_Layering_Hand_L(TEXT("Layering_Hand_L"));
const FName NAME_Layering_Hand_R(TEXT("Layering_Hand_R"));
const FName NAME_Layering_Head_Add(TEXT("Layering_Head_Add"));
const FName NAME_Layering_Spine_Add(TEXT("Layering_Spine_Add"));
const FName NAME_Mask_AimOffset(TEXT("Mask_AimOffset"));
const FName NAME_Mask_LandPrediction(TEXT("Mask_LandPrediction"));
const FName NAME__ALSCharacterAnimInstance__RotationAmount(TEXT("RotationAmount"));
const FName NAME_VB___foot_target_l(TEXT("VB foot_target_l"));
const FName NAME_VB___foot_target_r(TEXT("VB foot_target_r"));
const FName NAME_W_Gait(TEXT("W_Gait"));
const FName NAME__ALSCharacterAnimInstance__root(TEXT("root"));


FName UALSCharacterAnimInstance::NAME_ik_foot_l(TEXT("ik_foot_l"));
FName UALSCharacterAnimInstance::NAME_ik_foot_r(TEXT("ik_foot_r"));
static const FName NAME_BasePose_CLF(TEXT("BasePose_CLF"));
static const FName NAME_BasePose_N(TEXT("BasePose_N"));
static const FName NAME_Enable_FootIK_R(TEXT("Enable_FootIK_R"));
static const FName NAME_Enable_FootIK_L(TEXT("Enable_FootIK_L"));
static const FName NAME_Enable_HandIK_L(TEXT("Enable_HandIK_L"));
static const FName NAME_Enable_HandIK_R(TEXT("Enable_HandIK_R"));
static const FName NAME_Enable_Transition(TEXT("Enable_Transition"));
static const FName NAME_FootLock_L(TEXT("FootLock_L"));
static const FName NAME_FootLock_R(TEXT("FootLock_R"));
static const FName NAME_Grounded___Slot(TEXT("Grounded Slot"));
static const FName NAME_Layering_Arm_L(TEXT("Layering_Arm_L"));
static const FName NAME_Layering_Arm_L_Add(TEXT("Layering_Arm_L_Add"));
static const FName NAME_Layering_Arm_L_LS(TEXT("Layering_Arm_L_LS"));
static const FName NAME_Layering_Arm_R(TEXT("Layering_Arm_R"));
static const FName NAME_Layering_Arm_R_Add(TEXT("Layering_Arm_R_Add"));
static const FName NAME_Layering_Arm_R_LS(TEXT("Layering_Arm_R_LS"));
static const FName NAME_Layering_Hand_L(TEXT("Layering_Hand_L"));
static const FName NAME_Layering_Hand_R(TEXT("Layering_Hand_R"));
static const FName NAME_Layering_Head_Add(TEXT("Layering_Head_Add"));
static const FName NAME_Layering_Spine_Add(TEXT("Layering_Spine_Add"));
static const FName NAME_Mask_AimOffset(TEXT("Mask_AimOffset"));
static const FName NAME_Mask_LandPrediction(TEXT("Mask_LandPrediction"));
static const FName NAME__ALSCharacterAnimInstance__RotationAmount(TEXT("RotationAmount"));
static const FName NAME_VB___foot_target_l(TEXT("VB foot_target_l"));
static const FName NAME_VB___foot_target_r(TEXT("VB foot_target_r"));
static const FName NAME_W_Gait(TEXT("W_Gait"));
static const FName NAME__ALSCharacterAnimInstance__root(TEXT("root"));


void UALSCharacterAnimInstance::NativeInitializeAnimation()
Expand All @@ -62,7 +58,7 @@ void UALSCharacterAnimInstance::NativeBeginPlay()
// This is the reason why it is tried here to get the ALS debug component.
if (APawn* Owner = TryGetPawnOwner())
{
DebugComponent = Owner->FindComponentByClass<UALSDebugComponent>();
ALSDebugComponent = Owner->FindComponentByClass<UALSDebugComponent>();
}
}

Expand Down Expand Up @@ -486,7 +482,7 @@ void UALSCharacterAnimInstance::SetFootOffsets(float DeltaSeconds, FName EnableF
TraceEnd,
ECC_Visibility, Params);

if (DebugComponent && DebugComponent->GetShowTraces())
if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
UALSDebugComponent::DrawDebugLineTraceSingle(
World,
Expand Down Expand Up @@ -811,7 +807,7 @@ float UALSCharacterAnimInstance::CalculateLandPrediction() const
const bool bHit = World->SweepSingleByChannel(HitResult, CapsuleWorldLoc, CapsuleWorldLoc + TraceLength, FQuat::Identity,
ECC_Visibility, CapsuleCollisionShape, Params);

if (DebugComponent && DebugComponent->GetShowTraces())
if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
UALSDebugComponent::DrawDebugCapsuleTraceSingle(World,
CapsuleWorldLoc,
Expand Down
10 changes: 5 additions & 5 deletions Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ void UALSMantleComponent::BeginPlay()
OwnerCharacter = Cast<AALSBaseCharacter>(GetOwner());
if (OwnerCharacter)
{
ALSDebugComponent = OwnerCharacter->FindComponentByClass<UALSDebugComponent>();

AddTickPrerequisiteActor(OwnerCharacter); // Always tick after owner, so we'll use updated values

// Bindings
Expand All @@ -56,8 +58,6 @@ void UALSMantleComponent::BeginPlay()
OwnerCharacter->JumpPressedDelegate.AddUniqueDynamic(this, &UALSMantleComponent::OnOwnerJumpInput);
OwnerCharacter->RagdollStateChangedDelegate.AddUniqueDynamic(
this, &UALSMantleComponent::OnOwnerRagdollStateChanged);

DebugComponent = OwnerCharacter->FindComponentByClass<UALSDebugComponent>();
}
}
}
Expand Down Expand Up @@ -181,7 +181,7 @@ bool UALSMantleComponent::MantleCheck(const FALSMantleTraceSettings& TraceSettin
const bool bHit = World->SweepSingleByProfile(HitResult, TraceStart, TraceEnd, FQuat::Identity, MantleObjectDetectionProfile,
CapsuleCollisionShape, Params);

if (DebugComponent && DebugComponent->GetShowTraces())
if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
UALSDebugComponent::DrawDebugCapsuleTraceSingle(World,
TraceStart,
Expand Down Expand Up @@ -228,7 +228,7 @@ bool UALSMantleComponent::MantleCheck(const FALSMantleTraceSettings& TraceSettin
WalkableSurfaceDetectionChannel, SphereCollisionShape,
Params);

if (DebugComponent && DebugComponent->GetShowTraces())
if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
UALSDebugComponent::DrawDebugSphereTraceSingle(World,
TraceStart,
Expand Down Expand Up @@ -259,7 +259,7 @@ bool UALSMantleComponent::MantleCheck(const FALSMantleTraceSettings& TraceSettin
DownTraceLocation, 2.0f, OwnerCharacter->GetCapsuleComponent());
const bool bCapsuleHasRoom = UALSMathLibrary::CapsuleHasRoomCheck(OwnerCharacter->GetCapsuleComponent(),
CapsuleLocationFBase, 0.0f,
0.0f, DebugType, DebugComponent && DebugComponent->GetShowTraces());
0.0f, DebugType, ALSDebugComponent && ALSDebugComponent->GetShowTraces());

if (!bCapsuleHasRoom)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h
Original file line number Diff line number Diff line change
Expand Up @@ -646,5 +646,5 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter

private:
UPROPERTY()
UALSDebugComponent* DebugComponent = nullptr;
UALSDebugComponent* ALSDebugComponent = nullptr;
};
2 changes: 1 addition & 1 deletion Source/ALSV4_CPP/Public/Character/ALSPlayerCameraManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ class ALSV4_CPP_API AALSPlayerCameraManager : public APlayerCameraManager

private:
UPROPERTY()
UALSDebugComponent* DebugComponent = nullptr;
UALSDebugComponent* ALSDebugComponent = nullptr;
};
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,12 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Configuration|Dynamic Transition")
UAnimSequenceBase* TransitionAnim_L = nullptr;

static FName NAME_ik_foot_l;
static FName NAME_ik_foot_r;
/** IK Bone Names */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Configuration|Anim Graph - Foot IK")
FName IkFootL_BoneName = NAME_ik_foot_l;
FName IkFootL_BoneName = FName(TEXT("ik_foot_l"));

UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Configuration|Anim Graph - Foot IK")
FName IkFootR_BoneName = NAME_ik_foot_r;
FName IkFootR_BoneName = FName(TEXT("ik_foot_r"));

private:
FTimerHandle OnPivotTimer;
Expand All @@ -321,5 +319,5 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance
bool bCanPlayDynamicTransition = true;

UPROPERTY()
UALSDebugComponent* DebugComponent = nullptr;
UALSDebugComponent* ALSDebugComponent = nullptr;
};
2 changes: 1 addition & 1 deletion Source/ALSV4_CPP/Public/Components/ALSMantleComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ class ALSV4_CPP_API UALSMantleComponent : public UActorComponent
AALSBaseCharacter* OwnerCharacter;

UPROPERTY()
UALSDebugComponent* DebugComponent = nullptr;
UALSDebugComponent* ALSDebugComponent = nullptr;
};

0 comments on commit db5aa0b

Please sign in to comment.