diff --git a/Binaries/Win64/UE4Editor-PBCharacterMovement.dll b/Binaries/Win64/UE4Editor-PBCharacterMovement.dll index b2f36f4..4f174ad 100644 Binary files a/Binaries/Win64/UE4Editor-PBCharacterMovement.dll and b/Binaries/Win64/UE4Editor-PBCharacterMovement.dll differ diff --git a/Binaries/Win64/UE4Editor-PBCharacterMovement.pdb b/Binaries/Win64/UE4Editor-PBCharacterMovement.pdb index f492730..819f194 100644 Binary files a/Binaries/Win64/UE4Editor-PBCharacterMovement.pdb and b/Binaries/Win64/UE4Editor-PBCharacterMovement.pdb differ diff --git a/Binaries/Win64/UE4Editor.modules b/Binaries/Win64/UE4Editor.modules index b6df1da..59ecaad 100644 --- a/Binaries/Win64/UE4Editor.modules +++ b/Binaries/Win64/UE4Editor.modules @@ -1,5 +1,5 @@ { - "BuildId": "5660361", + "BuildId": "13144385", "Modules": { "PBCharacterMovement": "UE4Editor-PBCharacterMovement.dll" diff --git a/README.md b/README.md index bd718e3..63fb379 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/Source/PBCharacterMovement/Private/Character/PBPlayerMovement.cpp b/Source/PBCharacterMovement/Private/Character/PBPlayerMovement.cpp index e9971e0..8a2db82 100644 --- a/Source/PBCharacterMovement/Private/Character/PBPlayerMovement.cpp +++ b/Source/PBCharacterMovement/Private/Character/PBPlayerMovement.cpp @@ -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; } @@ -1278,7 +1279,7 @@ void UPBPlayerMovement::DoCrouchResize(float TargetTime, float DeltaTime, bool b auto DefaultCharacter = CharacterOwner->GetClass()->GetDefaultObject(); - if (bClientSimulation && CharacterOwner->Role == ROLE_SimulatedProxy) + if (bClientSimulation && CharacterOwner->GetLocalRole() == ROLE_SimulatedProxy) { // restore collision size before crouching CharacterCapsule->SetCapsuleSize(DefaultCharacter->GetCapsuleComponent()->GetUnscaledCapsuleRadius(), @@ -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)) @@ -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))