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 #295 #296

Merged
merged 3 commits into from
Oct 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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