diff --git a/.vsconfig b/.vsconfig index cdad639..3b919ea 100644 --- a/.vsconfig +++ b/.vsconfig @@ -1,9 +1,16 @@ { "version": "1.0", "components": [ + "Component.Unreal.Debugger", + "Component.Unreal.Ide", + "Microsoft.Net.Component.4.6.2.TargetingPack", + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL", + "Microsoft.VisualStudio.Component.VC.14.38.17.8.x86.x64", + "Microsoft.VisualStudio.Component.VC.Llvm.Clang", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", - "Microsoft.VisualStudio.Component.Windows10SDK", + "Microsoft.VisualStudio.Component.Windows11SDK.22621", "Microsoft.VisualStudio.Workload.CoreEditor", + "Microsoft.VisualStudio.Workload.ManagedDesktop", "Microsoft.VisualStudio.Workload.NativeDesktop", "Microsoft.VisualStudio.Workload.NativeGame" ] diff --git a/Source/Zippy.Target.cs b/Source/Zippy.Target.cs index 3ebbff1..45a6fdb 100644 --- a/Source/Zippy.Target.cs +++ b/Source/Zippy.Target.cs @@ -8,7 +8,7 @@ public class ZippyTarget : TargetRules public ZippyTarget(TargetInfo Target) : base(Target) { Type = TargetType.Game; - DefaultBuildSettings = BuildSettingsVersion.V2; + DefaultBuildSettings = BuildSettingsVersion.V5; ExtraModuleNames.Add("Zippy"); } } diff --git a/Source/Zippy/Private/ZippyCharacterMovementComponent.cpp b/Source/Zippy/Private/ZippyCharacterMovementComponent.cpp index 428991e..f9a332e 100644 --- a/Source/Zippy/Private/ZippyCharacterMovementComponent.cpp +++ b/Source/Zippy/Private/ZippyCharacterMovementComponent.cpp @@ -176,11 +176,11 @@ void UZippyCharacterMovementComponent::UpdateFromCompressedFlags(uint8 Flags) void UZippyCharacterMovementComponent::OnClientCorrectionReceived(FNetworkPredictionData_Client_Character& ClientData, float TimeStamp, FVector NewLocation, FVector NewVelocity, UPrimitiveComponent* NewBase, FName NewBaseBoneName, - bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode) + bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode, FVector ServerGravityDirection) { Super::OnClientCorrectionReceived(ClientData, TimeStamp, NewLocation, NewVelocity, NewBase, NewBaseBoneName, bHasBase, bBaseRelativePosition, - ServerMovementMode); + ServerMovementMode, ServerGravityDirection); CorrectionCount++; } @@ -259,11 +259,11 @@ bool UZippyCharacterMovementComponent::CanAttemptJump() const return Super::CanAttemptJump() || IsWallRunning() || IsHanging() || IsClimbing(); } -bool UZippyCharacterMovementComponent::DoJump(bool bReplayingMoves) +bool UZippyCharacterMovementComponent::DoJump(bool bReplayingMoves, float DeltaTime) { bool bWasWallRunning = IsWallRunning(); bool bWasOnWall = IsHanging() || IsClimbing(); - if (Super::DoJump(bReplayingMoves)) + if (Super::DoJump(bReplayingMoves, DeltaTime)) { if (bWasWallRunning) { @@ -660,7 +660,8 @@ void UZippyCharacterMovementComponent::PhysSlide(float deltaTime, int32 Iteratio StartNewPhysics(remainingTime,Iterations); return; } - else if ( IsSwimming() ) //just entered water + else if ( IsSwimming() //just entered water + ) { StartSwimming(OldLocation, OldVelocity, timeTick, remainingTime, Iterations); return; @@ -684,8 +685,7 @@ void UZippyCharacterMovementComponent::PhysSlide(float deltaTime, int32 Iteratio if ( bCheckLedges && !CurrentFloor.IsWalkableFloor() ) { // calculate possible alternate movement - const FVector GravDir = FVector(0.f,0.f,-1.f); - const FVector NewDelta = bTriedLedgeMove ? FVector::ZeroVector : GetLedgeMove(OldLocation, Delta, GravDir); + const FVector NewDelta = bTriedLedgeMove ? FVector::ZeroVector : GetLedgeMove(OldLocation, Delta, OldFloor); if ( !NewDelta.IsZero() ) { // first revert this move @@ -695,7 +695,7 @@ void UZippyCharacterMovementComponent::PhysSlide(float deltaTime, int32 Iteratio bTriedLedgeMove = true; // Try new movement direction - Velocity = NewDelta / timeTick; + Velocity = NewDelta/timeTick; // v = dx/dt remainingTime += timeTick; continue; } @@ -749,7 +749,7 @@ void UZippyCharacterMovementComponent::PhysSlide(float deltaTime, int32 Iteratio // check if just entered water if ( IsSwimming() ) { - StartSwimming(OldLocation, Velocity, timeTick, remainingTime, Iterations); + StartSwimming(OldLocation, OldVelocity, timeTick, remainingTime, Iterations); return; } @@ -887,7 +887,8 @@ void UZippyCharacterMovementComponent::PhysProne(float deltaTime, int32 Iteratio StartNewPhysics(remainingTime,Iterations); return; } - else if ( IsSwimming() ) //just entered water + else if ( IsSwimming() //just entered water + ) { StartSwimming(OldLocation, OldVelocity, timeTick, remainingTime, Iterations); return; @@ -911,8 +912,7 @@ void UZippyCharacterMovementComponent::PhysProne(float deltaTime, int32 Iteratio if ( bCheckLedges && !CurrentFloor.IsWalkableFloor() ) { // calculate possible alternate movement - const FVector GravDir = FVector(0.f,0.f,-1.f); - const FVector NewDelta = bTriedLedgeMove ? FVector::ZeroVector : GetLedgeMove(OldLocation, Delta, GravDir); + const FVector NewDelta = bTriedLedgeMove ? FVector::ZeroVector : GetLedgeMove(OldLocation, Delta, OldFloor); if ( !NewDelta.IsZero() ) { // first revert this move @@ -965,7 +965,7 @@ void UZippyCharacterMovementComponent::PhysProne(float deltaTime, int32 Iteratio // check if just entered water if ( IsSwimming() ) { - StartSwimming(OldLocation, Velocity, timeTick, remainingTime, Iterations); + StartSwimming(OldLocation, OldVelocity, timeTick, remainingTime, Iterations); return; } @@ -988,7 +988,7 @@ void UZippyCharacterMovementComponent::PhysProne(float deltaTime, int32 Iteratio if( !bJustTeleported && !HasAnimRootMotion() && !CurrentRootMotion.HasOverrideVelocity() && timeTick >= MIN_TICK_TIME) { // TODO-RootMotionSource: Allow this to happen during partial override Velocity, but only set allowed axes? - Velocity = (UpdatedComponent->GetComponentLocation() - OldLocation) / timeTick; // v = dx / dt + Velocity = (UpdatedComponent->GetComponentLocation() - OldLocation) / timeTick; MaintainHorizontalGroundVelocity(); } } diff --git a/Source/Zippy/Public/ZippyCharacterMovementComponent.h b/Source/Zippy/Public/ZippyCharacterMovementComponent.h index cebe53c..039984c 100644 --- a/Source/Zippy/Public/ZippyCharacterMovementComponent.h +++ b/Source/Zippy/Public/ZippyCharacterMovementComponent.h @@ -185,11 +185,11 @@ class ZIPPY_API UZippyCharacterMovementComponent : public UCharacterMovementComp virtual float GetMaxBrakingDeceleration() const override; virtual bool CanAttemptJump() const override; - virtual bool DoJump(bool bReplayingMoves) override; + virtual bool DoJump(bool bReplayingMoves, float DeltaTime) override; protected: virtual void UpdateFromCompressedFlags(uint8 Flags) override; - virtual void OnClientCorrectionReceived(FNetworkPredictionData_Client_Character& ClientData, float TimeStamp, FVector NewLocation, FVector NewVelocity, UPrimitiveComponent* NewBase, FName NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode) override; + virtual void OnClientCorrectionReceived(FNetworkPredictionData_Client_Character& ClientData, float TimeStamp, FVector NewLocation, FVector NewVelocity, UPrimitiveComponent* NewBase, FName NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode, FVector ServerGravityDirection) override; public: virtual void UpdateCharacterStateBeforeMovement(float DeltaSeconds) override; virtual void UpdateCharacterStateAfterMovement(float DeltaSeconds) override; diff --git a/Source/ZippyEditor.Target.cs b/Source/ZippyEditor.Target.cs index 391b0c8..0cdf228 100644 --- a/Source/ZippyEditor.Target.cs +++ b/Source/ZippyEditor.Target.cs @@ -8,7 +8,7 @@ public class ZippyEditorTarget : TargetRules public ZippyEditorTarget(TargetInfo Target) : base(Target) { Type = TargetType.Editor; - DefaultBuildSettings = BuildSettingsVersion.V2; + DefaultBuildSettings = BuildSettingsVersion.V5; ExtraModuleNames.Add("Zippy"); } } diff --git a/Zippy.uproject b/Zippy.uproject index f02a758..80c0f96 100644 --- a/Zippy.uproject +++ b/Zippy.uproject @@ -1,6 +1,6 @@ { "FileVersion": 3, - "EngineAssociation": "5.2", + "EngineAssociation": "5.6", "Category": "", "Description": "", "Modules": [