Skip to content

Commit

Permalink
update for 4.25
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercoms committed Jun 29, 2020
1 parent e53d299 commit 04b1e7e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Binary file modified Binaries/Win64/UE4Editor-PBCharacterMovement.dll
Binary file not shown.
Binary file modified Binaries/Win64/UE4Editor-PBCharacterMovement.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion Binaries/Win64/UE4Editor.modules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"BuildId": "5660361",
"BuildId": "13144385",
"Modules":
{
"PBCharacterMovement": "UE4Editor-PBCharacterMovement.dll"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ More info in this blog post: https://www.projectborealis.com/movement.

## Binaries

Binaries are compiled for `4.22`, and will work on Blueprint and C++ projects.
Binaries are compiled for `4.25`, and will work on Blueprint and C++ projects.
If you are using a different version of Unreal Engine 4, you will need to recompile the plugin.

## Redistribution note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,8 @@ void UPBPlayerMovement::CalcVelocity(float DeltaTime, float Friction, bool bFlui

// Do not update velocity when using root motion or when SimulatedProxy -
// SimulatedProxy are repped their Velocity
if (!HasValidData() || HasAnimRootMotion() || DeltaTime < MIN_TICK_TIME || (CharacterOwner && CharacterOwner->Role == ROLE_SimulatedProxy))
if (!HasValidData() || HasAnimRootMotion() || DeltaTime < MIN_TICK_TIME ||
(CharacterOwner && CharacterOwner->GetLocalRole() == ROLE_SimulatedProxy && !bWasSimulatingRootMotion))
{
return;
}
Expand Down Expand Up @@ -1278,7 +1279,7 @@ void UPBPlayerMovement::DoCrouchResize(float TargetTime, float DeltaTime, bool b

auto DefaultCharacter = CharacterOwner->GetClass()->GetDefaultObject<ACharacter>();

if (bClientSimulation && CharacterOwner->Role == ROLE_SimulatedProxy)
if (bClientSimulation && CharacterOwner->GetLocalRole() == ROLE_SimulatedProxy)
{
// restore collision size before crouching
CharacterCapsule->SetCapsuleSize(DefaultCharacter->GetCapsuleComponent()->GetUnscaledCapsuleRadius(),
Expand Down Expand Up @@ -1336,7 +1337,7 @@ void UPBPlayerMovement::DoCrouchResize(float TargetTime, float DeltaTime, bool b
CharacterOwner->OnStartCrouch(HalfHeightAdjust, ScaledHalfHeightAdjust);

// Don't smooth this change in mesh position
if (bClientSimulation && CharacterOwner->Role == ROLE_SimulatedProxy)
if (bClientSimulation && CharacterOwner->GetLocalRole() == ROLE_SimulatedProxy)
{
FNetworkPredictionData_Client_Character* ClientData = GetPredictionData_Client_Character();
if (ClientData && !FMath::IsNearlyZero(ClientData->MeshTranslationOffset.Z))
Expand Down Expand Up @@ -1525,7 +1526,7 @@ void UPBPlayerMovement::DoUnCrouchResize(float TargetTime, float DeltaTime, bool
CharacterOwner->OnEndCrouch(HalfHeightAdjust, ScaledHalfHeightAdjust);

// Don't smooth this change in mesh position
if (bClientSimulation && CharacterOwner->Role == ROLE_SimulatedProxy)
if (bClientSimulation && CharacterOwner->GetLocalRole() == ROLE_SimulatedProxy)
{
FNetworkPredictionData_Client_Character* ClientData = GetPredictionData_Client_Character();
if (ClientData && !FMath::IsNearlyZero(ClientData->MeshTranslationOffset.Z))
Expand Down

0 comments on commit 04b1e7e

Please sign in to comment.