diff --git a/ALSV4_CPP.uplugin b/ALSV4_CPP.uplugin
index 1ccb4fba..a68ab147 100644
--- a/ALSV4_CPP.uplugin
+++ b/ALSV4_CPP.uplugin
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 1,
- "VersionName": "4.20.1",
+ "VersionName": "4.21",
"FriendlyName": "Advanced Locomotion System Community",
"Description": "Performance optimized community version of LongmireLocomotion's Advanced Locomotion System V4",
"Category": "Animation",
@@ -10,7 +10,7 @@
"DocsURL": "https://github.com/dyanikoglu/ALS-Community",
"MarketplaceURL": "https://www.unrealengine.com/marketplace/en-US/product/advanced-locomotion-system-v1",
"SupportURL": "https://github.com/dyanikoglu/ALS-Community/issues",
- "EngineVersion": "4.26.0",
+ "EngineVersion": "4.27.0",
"EnabledByDefault": true,
"CanContainContent": true,
"IsBetaVersion": false,
diff --git a/Content/AdvancedLocomotionV4/Blueprints/UI/ALS_HUD.uasset b/Content/AdvancedLocomotionV4/Blueprints/UI/ALS_HUD.uasset
index 0b6f0fca..a2602b6a 100644
Binary files a/Content/AdvancedLocomotionV4/Blueprints/UI/ALS_HUD.uasset and b/Content/AdvancedLocomotionV4/Blueprints/UI/ALS_HUD.uasset differ
diff --git a/Content/AdvancedLocomotionV4/CharacterAssets/MannequinSkeleton/ALS_AnimBP.uasset b/Content/AdvancedLocomotionV4/CharacterAssets/MannequinSkeleton/ALS_AnimBP.uasset
index d4436685..8deb206b 100644
Binary files a/Content/AdvancedLocomotionV4/CharacterAssets/MannequinSkeleton/ALS_AnimBP.uasset and b/Content/AdvancedLocomotionV4/CharacterAssets/MannequinSkeleton/ALS_AnimBP.uasset differ
diff --git a/README.md b/README.md
index c4e594e8..df63dfce 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# Advanced Locomotion System Community
![image](https://github.com/dyanikoglu/ALS-Community/raw/main/Resources/Readme_Content_2.gif)
-Replicated and optimized community version of [Advanced Locomotion System V4](https://www.unrealengine.com/marketplace/en-US/product/advanced-locomotion-system-v1) for **Unreal Engine 4.26** with additional bug fixes.
+Replicated and optimized community version of [Advanced Locomotion System V4](https://www.unrealengine.com/marketplace/en-US/product/advanced-locomotion-system-v1) for **Unreal Engine 4.27** with additional bug fixes.
diff --git a/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp b/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp
index e3adb1b3..7e82a985 100644
--- a/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp
+++ b/Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp
@@ -237,6 +237,9 @@ void AALSBaseCharacter::RagdollStart()
// Step 3: Stop any active montages.
MainAnimInstance->Montage_Stop(0.2f);
+ // Fixes character mesh is showing default A pose for a split-second just before ragdoll ends in listen server games
+ GetMesh()->bOnlyAllowAutonomousTickPose = true;
+
SetReplicateMovement(false);
}
@@ -250,7 +253,9 @@ void AALSBaseCharacter::RagdollEnd()
GetMesh()->VisibilityBasedAnimTickOption = DefVisBasedTickOp;
}
+ // Revert back to default settings
MyCharacterMovementComponent->bIgnoreClientMovementErrorChecksAndCorrection = 0;
+ GetMesh()->bOnlyAllowAutonomousTickPose = false;
SetReplicateMovement(true);
if (!MainAnimInstance)
@@ -791,7 +796,7 @@ void AALSBaseCharacter::SetActorLocationDuringRagdoll(float DeltaTime)
}
if (!IsLocallyControlled())
{
- ServerRagdollPull = FMath::FInterpTo(ServerRagdollPull, 750, DeltaTime, 0.6);
+ ServerRagdollPull = FMath::FInterpTo(ServerRagdollPull, 750.0f, DeltaTime, 0.6f);
float RagdollSpeed = FVector(LastRagdollVelocity.X, LastRagdollVelocity.Y, 0).Size();
FName RagdollSocketPullName = RagdollSpeed > 300 ? NAME_spine_03 : NAME_pelvis;
GetMesh()->AddForce(
diff --git a/Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp b/Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp
index f67a14ce..bdb8d522 100644
--- a/Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp
+++ b/Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp
@@ -87,11 +87,22 @@ void AALSPlayerCameraManager::UpdateViewTargetInternal(FTViewTarget& OutVT, floa
FRotator OutRotation;
float OutFOV;
- if (CustomCameraBehavior(DeltaTime, OutLocation, OutRotation, OutFOV))
+ if (OutVT.Target->IsA())
{
- OutVT.POV.Location = OutLocation;
- OutVT.POV.Rotation = OutRotation;
- OutVT.POV.FOV = OutFOV;
+ if (CustomCameraBehavior(DeltaTime, OutLocation, OutRotation, OutFOV))
+ {
+ OutVT.POV.Location = OutLocation;
+ OutVT.POV.Rotation = OutRotation;
+ OutVT.POV.FOV = OutFOV;
+ }
+ else
+ {
+ OutVT.Target->CalcCamera(DeltaTime, OutVT.POV);
+ }
+ }
+ else
+ {
+ OutVT.Target->CalcCamera(DeltaTime, OutVT.POV);
}
}
}
diff --git a/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp b/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp
index 879fcff9..3822039c 100644
--- a/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp
+++ b/Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp
@@ -34,7 +34,7 @@ void UALSDebugComponent::TickComponent(float DeltaTime, ELevelTick TickType,
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
#if !UE_BUILD_SHIPPING
- if (!OwnerCharacter)
+ if (!OwnerCharacter || OwnerCharacter->GetLocalRole() != ROLE_Authority)
{
return;
}
diff --git a/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h b/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h
index e296762c..6afdd70a 100644
--- a/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h
+++ b/Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h
@@ -133,9 +133,6 @@ class ALSV4_CPP_API AALSBaseCharacter : public ACharacter
UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
EALSOverlayState GetOverlayState() const { return OverlayState; }
- UFUNCTION(BlueprintGetter, Category = "ALS|Character States")
- EALSOverlayState SwitchRight() const { return OverlayState; }
-
/** Landed, Jumped, Rolling, Mantling and Ragdoll*/
/** On Landed*/
UFUNCTION(BlueprintCallable, Category = "ALS|Character States")
diff --git a/Source/ALSV4_CPP/Public/Character/Animation/Notify/ALSAnimNotifyCameraShake.h b/Source/ALSV4_CPP/Public/Character/Animation/Notify/ALSAnimNotifyCameraShake.h
index bdfc3179..1f014653 100644
--- a/Source/ALSV4_CPP/Public/Character/Animation/Notify/ALSAnimNotifyCameraShake.h
+++ b/Source/ALSV4_CPP/Public/Character/Animation/Notify/ALSAnimNotifyCameraShake.h
@@ -9,10 +9,11 @@
#pragma once
#include "CoreMinimal.h"
+#include "Camera/CameraShakeBase.h"
#include "Animation/AnimNotifies/AnimNotify.h"
#include "ALSAnimNotifyCameraShake.generated.h"
-class UMatineeCameraShake;
+class UCameraShakeBase;
/**
* Generic camera shake animation notify for pawns with controller enabled
diff --git a/Source/ALSV4_CPP/Public/Components/ALSDebugComponent.h b/Source/ALSV4_CPP/Public/Components/ALSDebugComponent.h
index 900be31a..b43e2024 100644
--- a/Source/ALSV4_CPP/Public/Components/ALSDebugComponent.h
+++ b/Source/ALSV4_CPP/Public/Components/ALSDebugComponent.h
@@ -11,9 +11,11 @@
#include "Kismet/KismetSystemLibrary.h"
#include "Components/ActorComponent.h"
+#include "CollisionShape.h"
#include "ALSDebugComponent.generated.h"
class AALSBaseCharacter;
+class USkeletalMesh;
UCLASS(Blueprintable, BlueprintType)
class ALSV4_CPP_API UALSDebugComponent : public UActorComponent
@@ -162,6 +164,7 @@ class ALSV4_CPP_API UALSDebugComponent : public UActorComponent
bool bDebugMeshVisible = false;
+ UPROPERTY()
USkeletalMesh* DefaultSkeletalMesh = nullptr;
/// Stores the index, which is used to select the next focused debug ALSBaseCharacter.
diff --git a/Source/ALSV4_CPP/Public/Library/ALSCharacterStructLibrary.h b/Source/ALSV4_CPP/Public/Library/ALSCharacterStructLibrary.h
index 0fad3c84..d4128fbb 100644
--- a/Source/ALSV4_CPP/Public/Library/ALSCharacterStructLibrary.h
+++ b/Source/ALSV4_CPP/Public/Library/ALSCharacterStructLibrary.h
@@ -10,6 +10,8 @@
#include "CoreMinimal.h"
#include "Engine/DataTable.h"
+#include "PhysicalMaterials/PhysicalMaterial.h"
+#include "Materials/MaterialInterface.h"
#include "Library/ALSCharacterEnumLibrary.h"
#include "ALSCharacterStructLibrary.generated.h"
@@ -19,6 +21,9 @@ class UAnimMontage;
class UAnimSequenceBase;
class UCurveFloat;
class UNiagaraSystem;
+class UMaterialInterface;
+class USoundBase;
+class UPrimitiveComponent;
USTRUCT(BlueprintType)
struct FALSComponentAndTransform
@@ -29,7 +34,7 @@ struct FALSComponentAndTransform
FTransform Transform;
UPROPERTY(EditAnywhere, Category = "Character Struct Library")
- class UPrimitiveComponent* Component = nullptr;
+ UPrimitiveComponent* Component = nullptr;
};
USTRUCT(BlueprintType)
@@ -254,7 +259,7 @@ struct FALSHitFX : public FTableRowBase
GENERATED_BODY()
UPROPERTY(EditAnywhere, Category = "Surface")
- TEnumAsByte SurfaceType;
+ TEnumAsByte SurfaceType;
UPROPERTY(EditAnywhere, Category = "Sound")
TSoftObjectPtr Sound;
@@ -263,7 +268,7 @@ struct FALSHitFX : public FTableRowBase
EALSSpawnType SoundSpawnType;
UPROPERTY(EditAnywhere, Category = "Sound", meta = (EditCondition = "SoundSpawnType == EALSSpawnType::Attached"))
- TEnumAsByte SoundAttachmentType;
+ TEnumAsByte SoundAttachmentType;
UPROPERTY(EditAnywhere, Category = "Sound")
FVector SoundLocationOffset;
@@ -278,7 +283,7 @@ struct FALSHitFX : public FTableRowBase
EALSSpawnType DecalSpawnType;
UPROPERTY(EditAnywhere, Category = "Decal", meta = (EditCondition = "DecalSpawnType == EALSSpawnType::Attached"))
- TEnumAsByte DecalAttachmentType;
+ TEnumAsByte DecalAttachmentType;
UPROPERTY(EditAnywhere, Category = "Decal")
float DecalLifeSpan = 10.0f;
@@ -293,13 +298,13 @@ struct FALSHitFX : public FTableRowBase
FRotator DecalRotationOffset;
UPROPERTY(EditAnywhere, Category = "Niagara")
- TSoftObjectPtr NiagaraSystem;
+ TSoftObjectPtr NiagaraSystem;
UPROPERTY(EditAnywhere, Category = "Niagara")
EALSSpawnType NiagaraSpawnType;
UPROPERTY(EditAnywhere, Category = "Niagara", meta = (EditCondition = "NiagaraSpawnType == EALSSpawnType::Attached"))
- TEnumAsByte NiagaraAttachmentType;
+ TEnumAsByte NiagaraAttachmentType;
UPROPERTY(EditAnywhere, Category = "Niagara")
FVector NiagaraLocationOffset;