Skip to content

Commit

Permalink
Merge pull request #300 from dyanikoglu/dev
Browse files Browse the repository at this point in the history
Hotfix v4.21.1
  • Loading branch information
dyanikoglu authored Oct 19, 2021
2 parents a4d273c + c3503c8 commit 494911c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void UALSCharacterAnimInstance::NativeUpdateAnimation(float DeltaSeconds)
{
Super::NativeUpdateAnimation(DeltaSeconds);

if (!Character || DeltaSeconds == 0.0f)
if (!Character)
{
// Fix character looking right on editor
RotationMode = EALSRotationMode::VelocityDirection;
Expand All @@ -79,6 +79,12 @@ void UALSCharacterAnimInstance::NativeUpdateAnimation(float DeltaSeconds)
return;
}

if (DeltaSeconds == 0.0f)
{
// Prevent update on the first frame (potential division by zero)
return;
}

// Update rest of character information. Others are reflected into anim bp when they're set inside character class
CharacterInformation.Velocity = Character->GetCharacterMovement()->Velocity;
CharacterInformation.MovementInput = Character->GetMovementInput();
Expand Down
1 change: 1 addition & 0 deletions Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h
Original file line number Diff line number Diff line change
Expand Up @@ -645,5 +645,6 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter
bool bEnableNetworkOptimizations = false;

private:
UPROPERTY()
UALSDebugComponent* DebugComponent = nullptr;
};
1 change: 1 addition & 0 deletions Source/ALSV4_CPP/Public/Character/ALSPlayerCameraManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ class ALSV4_CPP_API AALSPlayerCameraManager : public APlayerCameraManager
FVector DebugViewOffset;

private:
UPROPERTY()
UALSDebugComponent* DebugComponent = nullptr;
};
Original file line number Diff line number Diff line change
Expand Up @@ -320,5 +320,6 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance

bool bCanPlayDynamicTransition = true;

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

UPROPERTY()
UALSDebugComponent* DebugComponent = nullptr;
};

0 comments on commit 494911c

Please sign in to comment.