Skip to content

Commit

Permalink
Merge pull request #296 from adrian-j-programmer/patch-1
Browse files Browse the repository at this point in the history
Fix #295
  • Loading branch information
dyanikoglu committed Oct 17, 2021
2 parents f18bf3d + 62fee0d commit c3503c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Replicated and optimized community version of [Advanced Locomotion System V4](ht
## Features
- Based on latest marketplace release (V4) of Advanced Locomotion System
- Fully implemented in C++
- Full replication support with low bandwidth usage
- Full replication support with low bandwidth usage (Ragdoll replication is in experimental state)
- Plugin structure
- Highly optimized for production
- Mantling and debugging features are implemented as a separate plug-in/plug-out type actor component to reduce total overhead on base character class
Expand Down
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

0 comments on commit c3503c8

Please sign in to comment.