diff --git a/ALSV4_CPP.uplugin b/ALSV4_CPP.uplugin index a68ab147..a5d21654 100644 --- a/ALSV4_CPP.uplugin +++ b/ALSV4_CPP.uplugin @@ -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", diff --git a/Content/AdvancedLocomotionV4/Blueprints/UI/ALS_HUD.uasset b/Content/AdvancedLocomotionV4/Blueprints/UI/ALS_HUD.uasset index a2602b6a..ff58341d 100644 Binary files a/Content/AdvancedLocomotionV4/Blueprints/UI/ALS_HUD.uasset and b/Content/AdvancedLocomotionV4/Blueprints/UI/ALS_HUD.uasset differ diff --git a/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp b/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp index 7e82a985..27e2a58b 100644 --- a/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp +++ b/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp @@ -156,7 +156,7 @@ void AALSBaseCharacter::BeginPlay() MyCharacterMovementComponent->SetMovementSettings(GetTargetMovementSettings()); - DebugComponent = FindComponentByClass(); + ALSDebugComponent = FindComponentByClass(); } void AALSBaseCharacter::PreInitializeComponents() @@ -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, diff --git a/Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp b/Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp index bdb8d522..6baf6246 100644 --- a/Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp +++ b/Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp @@ -64,7 +64,7 @@ void AALSPlayerCameraManager::OnPossess(AALSBaseCharacter* NewCharacter) SetActorLocation(TPSLoc); SmoothedPivotTarget.SetLocation(TPSLoc); - DebugComponent = ControlledCharacter->FindComponentByClass(); + ALSDebugComponent = ControlledCharacter->FindComponentByClass(); } float AALSPlayerCameraManager::GetCameraBehaviorParam(FName CurveName) const @@ -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, diff --git a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp index 13c09838..59341222 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp @@ -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() @@ -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(); + ALSDebugComponent = Owner->FindComponentByClass(); } } @@ -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, @@ -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, diff --git a/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp b/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp index 4733f7f0..e129b645 100644 --- a/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp +++ b/Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp @@ -41,6 +41,8 @@ void UALSMantleComponent::BeginPlay() OwnerCharacter = Cast(GetOwner()); if (OwnerCharacter) { + ALSDebugComponent = OwnerCharacter->FindComponentByClass(); + AddTickPrerequisiteActor(OwnerCharacter); // Always tick after owner, so we'll use updated values // Bindings @@ -56,8 +58,6 @@ void UALSMantleComponent::BeginPlay() OwnerCharacter->JumpPressedDelegate.AddUniqueDynamic(this, &UALSMantleComponent::OnOwnerJumpInput); OwnerCharacter->RagdollStateChangedDelegate.AddUniqueDynamic( this, &UALSMantleComponent::OnOwnerRagdollStateChanged); - - DebugComponent = OwnerCharacter->FindComponentByClass(); } } } @@ -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, @@ -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, @@ -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) { diff --git a/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h b/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h index 712a7fb7..517bf86c 100644 --- a/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h +++ b/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h @@ -646,5 +646,5 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter private: UPROPERTY() - UALSDebugComponent* DebugComponent = nullptr; + UALSDebugComponent* ALSDebugComponent = nullptr; }; diff --git a/Source/ALSV4_CPP/Public/Character/ALSPlayerCameraManager.h b/Source/ALSV4_CPP/Public/Character/ALSPlayerCameraManager.h index d9a55829..23b37bea 100644 --- a/Source/ALSV4_CPP/Public/Character/ALSPlayerCameraManager.h +++ b/Source/ALSV4_CPP/Public/Character/ALSPlayerCameraManager.h @@ -78,5 +78,5 @@ class ALSV4_CPP_API AALSPlayerCameraManager : public APlayerCameraManager private: UPROPERTY() - UALSDebugComponent* DebugComponent = nullptr; + UALSDebugComponent* ALSDebugComponent = nullptr; }; diff --git a/Source/ALSV4_CPP/Public/Character/Animation/ALSCharacterAnimInstance.h b/Source/ALSV4_CPP/Public/Character/Animation/ALSCharacterAnimInstance.h index 6d850a38..f41ec63b 100644 --- a/Source/ALSV4_CPP/Public/Character/Animation/ALSCharacterAnimInstance.h +++ b/Source/ALSV4_CPP/Public/Character/Animation/ALSCharacterAnimInstance.h @@ -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; @@ -321,5 +319,5 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance bool bCanPlayDynamicTransition = true; UPROPERTY() - UALSDebugComponent* DebugComponent = nullptr; + UALSDebugComponent* ALSDebugComponent = nullptr; }; diff --git a/Source/ALSV4_CPP/Public/Components/ALSMantleComponent.h b/Source/ALSV4_CPP/Public/Components/ALSMantleComponent.h index f275c670..949a62ad 100644 --- a/Source/ALSV4_CPP/Public/Components/ALSMantleComponent.h +++ b/Source/ALSV4_CPP/Public/Components/ALSMantleComponent.h @@ -114,5 +114,5 @@ class ALSV4_CPP_API UALSMantleComponent : public UActorComponent AALSBaseCharacter* OwnerCharacter; UPROPERTY() - UALSDebugComponent* DebugComponent = nullptr; + UALSDebugComponent* ALSDebugComponent = nullptr; };