Skip to content

Commit 494911c

Browse files
authored
Merge pull request #300 from dyanikoglu/dev
Hotfix v4.21.1
2 parents a4d273c + c3503c8 commit 494911c

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void UALSCharacterAnimInstance::NativeUpdateAnimation(float DeltaSeconds)
7070
{
7171
Super::NativeUpdateAnimation(DeltaSeconds);
7272

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

82+
if (DeltaSeconds == 0.0f)
83+
{
84+
// Prevent update on the first frame (potential division by zero)
85+
return;
86+
}
87+
8288
// Update rest of character information. Others are reflected into anim bp when they're set inside character class
8389
CharacterInformation.Velocity = Character->GetCharacterMovement()->Velocity;
8490
CharacterInformation.MovementInput = Character->GetMovementInput();

Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,5 +645,6 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter
645645
bool bEnableNetworkOptimizations = false;
646646

647647
private:
648+
UPROPERTY()
648649
UALSDebugComponent* DebugComponent = nullptr;
649650
};

Source/ALSV4_CPP/Public/Character/ALSPlayerCameraManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,6 @@ class ALSV4_CPP_API AALSPlayerCameraManager : public APlayerCameraManager
7777
FVector DebugViewOffset;
7878

7979
private:
80+
UPROPERTY()
8081
UALSDebugComponent* DebugComponent = nullptr;
8182
};

Source/ALSV4_CPP/Public/Character/Animation/ALSCharacterAnimInstance.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,5 +320,6 @@ class ALSV4_CPP_API UALSCharacterAnimInstance : public UAnimInstance
320320

321321
bool bCanPlayDynamicTransition = true;
322322

323+
UPROPERTY()
323324
UALSDebugComponent* DebugComponent = nullptr;
324325
};

Source/ALSV4_CPP/Public/Components/ALSMantleComponent.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,6 @@ class ALSV4_CPP_API UALSMantleComponent : public UActorComponent
113113
UPROPERTY()
114114
AALSBaseCharacter* OwnerCharacter;
115115

116+
UPROPERTY()
116117
UALSDebugComponent* DebugComponent = nullptr;
117118
};

0 commit comments

Comments
 (0)