Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #460 - Updated Plugin to ensure it can be packaged as a precompiled plugin #469

Closed
4 changes: 4 additions & 0 deletions Source/ALSV4_CPP/Private/Character/ALSCharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

#include "Character/ALSCharacter.h"

#include "Components/SkeletalMeshComponent.h"
#include "Components/StaticMeshComponent.h"

#include "Engine/StaticMesh.h"
#include "Engine/SkeletalMesh.h"
#include "AI/ALSAIController.h"
#include "Kismet/GameplayStatics.h"

Expand Down
6 changes: 4 additions & 2 deletions Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

#include "Character/ALSPlayerCameraManager.h"

#include "Engine/World.h"

#include "Character/ALSBaseCharacter.h"
#include "Character/ALSPlayerController.h"
#include "Character/Animation/ALSPlayerCameraBehavior.h"
#include "Components/ALSDebugComponent.h"
#include "Components/SkeletalMeshComponent.h"

#include "Kismet/KismetMathLibrary.h"

Expand Down Expand Up @@ -195,8 +197,8 @@ bool AALSPlayerCameraManager::CustomCameraBehavior(float DeltaTime, FVector& Loc

FHitResult HitResult;
const FCollisionShape SphereCollisionShape = FCollisionShape::MakeSphere(TraceRadius);
const bool bHit = World->SweepSingleByChannel(HitResult, TraceOrigin, TargetCameraLocation, FQuat::Identity,
TraceChannel, SphereCollisionShape, Params);
const bool bHit(World->SweepSingleByChannel(HitResult, TraceOrigin, TargetCameraLocation, FQuat::Identity,
TraceChannel, SphereCollisionShape, Params));

if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
#include "Character/ALSBaseCharacter.h"
#include "Library/ALSMathLibrary.h"
#include "Components/ALSDebugComponent.h"
#include "Components/SkeletalMeshComponent.h"

#include "Curves/CurveVector.h"
#include "Curves/CurveFloat.h"
#include "Components/CapsuleComponent.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "TimerManager.h"

#include "Engine/World.h"

static const FName NAME_BasePose_CLF(TEXT("BasePose_CLF"));
static const FName NAME_BasePose_N(TEXT("BasePose_N"));
Expand Down Expand Up @@ -483,10 +487,10 @@ void UALSCharacterAnimInstance::SetFootOffsets(float DeltaSeconds, FName EnableF
const FVector TraceEnd = IKFootFloorLoc - FVector(0.0, 0.0, Config.IK_TraceDistanceBelowFoot);

FHitResult HitResult;
const bool bHit = World->LineTraceSingleByChannel(HitResult,
TraceStart,
TraceEnd,
ECC_Visibility, Params);
const bool bHit(World->LineTraceSingleByChannel(HitResult,
TraceStart,
TraceEnd,
ECC_Visibility, Params));

if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
Expand Down Expand Up @@ -732,9 +736,8 @@ float UALSCharacterAnimInstance::CalculateStrideBlend() const
// The curves are used to map the stride amount to the speed for maximum control.
const float CurveTime = CharacterInformation.Speed / GetOwningComponent()->GetComponentScale().Z;
const float ClampedGait = GetAnimCurveClamped(NAME_W_Gait, -1.0, 0.0f, 1.0f);
const float LerpedStrideBlend =
FMath::Lerp(StrideBlend_N_Walk->GetFloatValue(CurveTime), StrideBlend_N_Run->GetFloatValue(CurveTime),
ClampedGait);
const float LerpedStrideBlend(FMath::Lerp(StrideBlend_N_Walk->GetFloatValue(CurveTime), StrideBlend_N_Run->GetFloatValue(CurveTime),
ClampedGait));
return FMath::Lerp(LerpedStrideBlend, StrideBlend_C_Walk->GetFloatValue(CharacterInformation.Speed),
GetCurveValue(NAME_BasePose_CLF));
}
Expand Down Expand Up @@ -809,8 +812,8 @@ float UALSCharacterAnimInstance::CalculateLandPrediction() const
FHitResult HitResult;
const FCollisionShape CapsuleCollisionShape = FCollisionShape::MakeCapsule(CapsuleComp->GetUnscaledCapsuleRadius(),
CapsuleComp->GetUnscaledCapsuleHalfHeight());
const bool bHit = World->SweepSingleByChannel(HitResult, CapsuleWorldLoc, CapsuleWorldLoc + TraceLength, FQuat::Identity,
ECC_Visibility, CapsuleCollisionShape, Params);
const bool bHit(World->SweepSingleByChannel(HitResult, CapsuleWorldLoc, CapsuleWorldLoc + TraceLength, FQuat::Identity,
ECC_Visibility, CapsuleCollisionShape, Params));

if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


#include "Character/Animation/Notify/ALSAnimNotifyCameraShake.h"

#include "Components/AudioComponent.h"

void UALSAnimNotifyCameraShake::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

#include "Character/Animation/Notify/ALSAnimNotifyFootstep.h"

#include "Components/SkeletalMeshComponent.h"
#include "Components/AudioComponent.h"
#include "Engine/DataTable.h"
#include "Kismet/KismetSystemLibrary.h"
#include "Library/ALSCharacterStructLibrary.h"
#include "PhysicalMaterials/PhysicalMaterial.h"
#include "NiagaraSystem.h"
#include "NiagaraFunctionLibrary.h"

#include "Sound/SoundBase.h"

const FName NAME_Mask_FootstepSound(TEXT("Mask_FootstepSound"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


#include "Character/Animation/Notify/ALSNotifyStateEarlyBlendOut.h"

#include "Components/SkeletalMeshComponent.h"
#include "Character/ALSBaseCharacter.h"

void UALSNotifyStateEarlyBlendOut::NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation,
Expand Down
9 changes: 5 additions & 4 deletions Source/ALSV4_CPP/Private/Components/ALSMantleComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "Components/ALSMantleComponent.h"

#include "Engine/World.h"

#include "Character/ALSCharacter.h"
#include "Character/Animation/ALSCharacterAnimInstance.h"
Expand Down Expand Up @@ -173,8 +174,8 @@ bool UALSMantleComponent::MantleCheck(const FALSMantleTraceSettings& TraceSettin
FHitResult HitResult;
{
const FCollisionShape CapsuleCollisionShape = FCollisionShape::MakeCapsule(TraceSettings.ForwardTraceRadius, HalfHeight);
const bool bHit = World->SweepSingleByProfile(HitResult, TraceStart, TraceEnd, FQuat::Identity, MantleObjectDetectionProfile,
CapsuleCollisionShape, Params);
const bool bHit(World->SweepSingleByProfile(HitResult, TraceStart, TraceEnd, FQuat::Identity, MantleObjectDetectionProfile,
CapsuleCollisionShape, Params));

if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
Expand Down Expand Up @@ -219,9 +220,9 @@ bool UALSMantleComponent::MantleCheck(const FALSMantleTraceSettings& TraceSettin

{
const FCollisionShape SphereCollisionShape = FCollisionShape::MakeSphere(TraceSettings.DownwardTraceRadius);
const bool bHit = World->SweepSingleByChannel(HitResult, DownwardTraceStart, DownwardTraceEnd, FQuat::Identity,
const bool bHit(World->SweepSingleByChannel(HitResult, DownwardTraceStart, DownwardTraceEnd, FQuat::Identity,
WalkableSurfaceDetectionChannel, SphereCollisionShape,
Params);
Params));

if (ALSDebugComponent && ALSDebugComponent->GetShowTraces())
{
Expand Down
5 changes: 3 additions & 2 deletions Source/ALSV4_CPP/Private/Library/ALSMathLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "Library/ALSMathLibrary.h"

#include "Engine/World.h"

#include "Library/ALSCharacterStructLibrary.h"
#include "Components/ALSDebugComponent.h"
Expand Down Expand Up @@ -51,8 +52,8 @@ bool UALSMathLibrary::CapsuleHasRoomCheck(UCapsuleComponent* Capsule, FVector Ta

FHitResult HitResult;
const FCollisionShape SphereCollisionShape = FCollisionShape::MakeSphere(Radius);
const bool bHit = World->SweepSingleByChannel(HitResult, TraceStart, TraceEnd, FQuat::Identity,
ECC_Visibility, FCollisionShape::MakeSphere(Radius), Params);
const bool bHit(World->SweepSingleByChannel(HitResult, TraceStart, TraceEnd, FQuat::Identity,
ECC_Visibility, FCollisionShape::MakeSphere(Radius), Params));

if (DrawDebugTrace)
{
Expand Down