Skip to content

Commit 04b1e7e

Browse files
committed
update for 4.25
1 parent e53d299 commit 04b1e7e

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed
Binary file not shown.
Binary file not shown.

Binaries/Win64/UE4Editor.modules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"BuildId": "5660361",
2+
"BuildId": "13144385",
33
"Modules":
44
{
55
"PBCharacterMovement": "UE4Editor-PBCharacterMovement.dll"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ More info in this blog post: https://www.projectborealis.com/movement.
1818

1919
## Binaries
2020

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

2424
## Redistribution note

Source/PBCharacterMovement/Private/Character/PBPlayerMovement.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,8 @@ void UPBPlayerMovement::CalcVelocity(float DeltaTime, float Friction, bool bFlui
10941094

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

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

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

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

15271528
// Don't smooth this change in mesh position
1528-
if (bClientSimulation && CharacterOwner->Role == ROLE_SimulatedProxy)
1529+
if (bClientSimulation && CharacterOwner->GetLocalRole() == ROLE_SimulatedProxy)
15291530
{
15301531
FNetworkPredictionData_Client_Character* ClientData = GetPredictionData_Client_Character();
15311532
if (ClientData && !FMath::IsNearlyZero(ClientData->MeshTranslationOffset.Z))

0 commit comments

Comments
 (0)