Skip to content
Open
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
9 changes: 8 additions & 1 deletion .vsconfig
Original file line number Diff line number Diff line change
@@ -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"
]
Expand Down
2 changes: 1 addition & 1 deletion Source/Zippy.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
28 changes: 14 additions & 14 deletions Source/Zippy/Private/ZippyCharacterMovementComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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;
}

Expand All @@ -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();
}
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Zippy/Public/ZippyCharacterMovementComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Source/ZippyEditor.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
2 changes: 1 addition & 1 deletion Zippy.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FileVersion": 3,
"EngineAssociation": "5.2",
"EngineAssociation": "5.6",
"Category": "",
"Description": "",
"Modules": [
Expand Down