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

Release v4.21 #293

Merged
merged 17 commits into from
Oct 8, 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
4 changes: 2 additions & 2 deletions ALSV4_CPP.uplugin
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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,
Expand Down
Binary file modified Content/AdvancedLocomotionV4/Blueprints/UI/ALS_HUD.uasset
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

<p align="center">
<a href="https://discord.gg/wYYMHFu"><img src="https://i.imgur.com/LP9bZQj.png"></a>
Expand Down
7 changes: 6 additions & 1 deletion Source/ALSV4_CPP/Private/Character/ALSBaseCharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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)
Expand Down Expand Up @@ -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(
Expand Down
19 changes: 15 additions & 4 deletions Source/ALSV4_CPP/Private/Character/ALSPlayerCameraManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,22 @@ void AALSPlayerCameraManager::UpdateViewTargetInternal(FTViewTarget& OutVT, floa
FRotator OutRotation;
float OutFOV;

if (CustomCameraBehavior(DeltaTime, OutLocation, OutRotation, OutFOV))
if (OutVT.Target->IsA<AALSBaseCharacter>())
{
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);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/ALSV4_CPP/Private/Components/ALSDebugComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 0 additions & 3 deletions Source/ALSV4_CPP/Public/Character/ALSBaseCharacter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Source/ALSV4_CPP/Public/Components/ALSDebugComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
17 changes: 11 additions & 6 deletions Source/ALSV4_CPP/Public/Library/ALSCharacterStructLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -19,6 +21,9 @@ class UAnimMontage;
class UAnimSequenceBase;
class UCurveFloat;
class UNiagaraSystem;
class UMaterialInterface;
class USoundBase;
class UPrimitiveComponent;

USTRUCT(BlueprintType)
struct FALSComponentAndTransform
Expand All @@ -29,7 +34,7 @@ struct FALSComponentAndTransform
FTransform Transform;

UPROPERTY(EditAnywhere, Category = "Character Struct Library")
class UPrimitiveComponent* Component = nullptr;
UPrimitiveComponent* Component = nullptr;
};

USTRUCT(BlueprintType)
Expand Down Expand Up @@ -254,7 +259,7 @@ struct FALSHitFX : public FTableRowBase
GENERATED_BODY()

UPROPERTY(EditAnywhere, Category = "Surface")
TEnumAsByte<EPhysicalSurface> SurfaceType;
TEnumAsByte<enum EPhysicalSurface> SurfaceType;

UPROPERTY(EditAnywhere, Category = "Sound")
TSoftObjectPtr<USoundBase> Sound;
Expand All @@ -263,7 +268,7 @@ struct FALSHitFX : public FTableRowBase
EALSSpawnType SoundSpawnType;

UPROPERTY(EditAnywhere, Category = "Sound", meta = (EditCondition = "SoundSpawnType == EALSSpawnType::Attached"))
TEnumAsByte<EAttachLocation::Type> SoundAttachmentType;
TEnumAsByte<enum EAttachLocation::Type> SoundAttachmentType;

UPROPERTY(EditAnywhere, Category = "Sound")
FVector SoundLocationOffset;
Expand All @@ -278,7 +283,7 @@ struct FALSHitFX : public FTableRowBase
EALSSpawnType DecalSpawnType;

UPROPERTY(EditAnywhere, Category = "Decal", meta = (EditCondition = "DecalSpawnType == EALSSpawnType::Attached"))
TEnumAsByte<EAttachLocation::Type> DecalAttachmentType;
TEnumAsByte<enum EAttachLocation::Type> DecalAttachmentType;

UPROPERTY(EditAnywhere, Category = "Decal")
float DecalLifeSpan = 10.0f;
Expand All @@ -293,13 +298,13 @@ struct FALSHitFX : public FTableRowBase
FRotator DecalRotationOffset;

UPROPERTY(EditAnywhere, Category = "Niagara")
TSoftObjectPtr<class UNiagaraSystem> NiagaraSystem;
TSoftObjectPtr<UNiagaraSystem> NiagaraSystem;

UPROPERTY(EditAnywhere, Category = "Niagara")
EALSSpawnType NiagaraSpawnType;

UPROPERTY(EditAnywhere, Category = "Niagara", meta = (EditCondition = "NiagaraSpawnType == EALSSpawnType::Attached"))
TEnumAsByte<EAttachLocation::Type> NiagaraAttachmentType;
TEnumAsByte<enum EAttachLocation::Type> NiagaraAttachmentType;

UPROPERTY(EditAnywhere, Category = "Niagara")
FVector NiagaraLocationOffset;
Expand Down