Skip to content

Commit

Permalink
Do not use debug stuff in shipping builds, add missing OnGaitChanged(…
Browse files Browse the repository at this point in the history
…Prev) call
  • Loading branch information
dyanikoglu committed Feb 17, 2021
1 parent 0d8971e commit 6191554
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ void AALSBaseCharacter::Tick(float DeltaTime)
PreviousVelocity = GetVelocity();
PreviousAimYaw = AimingRotation.Yaw;

#if !UE_BUILD_SHIPPING
DrawDebugSpheres();
#endif
}

void AALSBaseCharacter::RagdollStart()
Expand Down Expand Up @@ -312,7 +314,6 @@ void AALSBaseCharacter::SetStance(const EALSStance NewStance)
{
const EALSStance Prev = Stance;
Stance = NewStance;
MainAnimInstance->Stance = Stance;
OnStanceChanged(Prev);
}
}
Expand All @@ -321,8 +322,9 @@ void AALSBaseCharacter::SetGait(const EALSGait NewGait)
{
if (Gait != NewGait)
{
const EALSGait Prev = Gait;
Gait = NewGait;
MainAnimInstance->Gait = Gait;
OnGaitChanged(Prev);
}
}

Expand Down Expand Up @@ -358,7 +360,6 @@ void AALSBaseCharacter::Server_SetDesiredGait_Implementation(EALSGait NewGait)
void AALSBaseCharacter::SetDesiredRotationMode(EALSRotationMode NewRotMode)
{
DesiredRotationMode = NewRotMode;

if (GetLocalRole() == ROLE_AutonomousProxy)
{
Server_SetDesiredRotationMode(NewRotMode);
Expand Down Expand Up @@ -833,6 +834,7 @@ void AALSBaseCharacter::OnMovementActionChanged(const EALSMovementAction Previou

void AALSBaseCharacter::OnStanceChanged(const EALSStance PreviousStance)
{
MainAnimInstance->Stance = Stance;
}

void AALSBaseCharacter::OnRotationModeChanged(EALSRotationMode PreviousRotationMode)
Expand All @@ -848,6 +850,7 @@ void AALSBaseCharacter::OnRotationModeChanged(EALSRotationMode PreviousRotationM

void AALSBaseCharacter::OnGaitChanged(const EALSGait PreviousGait)
{
MainAnimInstance->Gait = Gait;
}

void AALSBaseCharacter::OnViewModeChanged(const EALSViewMode PreviousViewMode)
Expand Down Expand Up @@ -1219,8 +1222,8 @@ bool AALSBaseCharacter::MantleCheck(const FALSMantleTraceSettings& TraceSettings
// Not a valid surface to mantle
return false;
}
if (HitResult.GetComponent() != nullptr)

if (HitResult.GetComponent() != nullptr)
{
UPrimitiveComponent* PrimitiveComponent = HitResult.GetComponent();
if (PrimitiveComponent && PrimitiveComponent->GetComponentVelocity().Size() > AcceptableVelocityWhileMantling)
Expand All @@ -1229,7 +1232,7 @@ bool AALSBaseCharacter::MantleCheck(const FALSMantleTraceSettings& TraceSettings
return false;
}
}

const FVector InitialTraceImpactPoint = HitResult.ImpactPoint;
const FVector InitialTraceNormal = HitResult.ImpactNormal;

Expand Down

0 comments on commit 6191554

Please sign in to comment.