From a4d273ce140c18475d3ef2f14dd33c740e3392bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fa=20Can=20Yan=C4=B1ko=C4=9Flu?= Date: Fri, 8 Oct 2021 16:47:26 +0300 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df63dfce..402cbe00 100644 --- a/README.md +++ b/README.md @@ -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 From 62fee0de8f43b6ec10d2972cbf7a64a2580f56b6 Mon Sep 17 00:00:00 2001 From: adrian-j-programmer <52369028+adrian-j-programmer@users.noreply.github.com> Date: Fri, 15 Oct 2021 16:50:21 +0200 Subject: [PATCH 2/2] Fix #295 Remove race condition between first replication pass and first frame update that can lead to rotation mode being set to VelocityDirection in a client-server scenario. --- .../Character/Animation/ALSCharacterAnimInstance.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp index 9a39dbf2..13c09838 100644 --- a/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp +++ b/Source/ALSV4_CPP/Private/Character/Animation/ALSCharacterAnimInstance.cpp @@ -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; @@ -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();