Properties that uses DOREPLIFETIME_ACTIVE_OVERRIDE (ex. RepRootMotion ) will also skip replication when an actor channel is newly opened.
This means that if the variables on the server side do not change, the opportunity to synchronize the property will be lost forever.
ACharacter::RepRootMotion.IsActive on a client will be fixed to a false value due to this behavior, and it disables root motion movement synchronization.
The following workarounds works. It will check the properties when the actor channel is newly opened regardless of the DOREPLIFETIME_ACTIVE_OVERRIDE flag.
// Compare the specific FRepParentCmd. // Returns true if the property (or any of its nested FRepLayoutCmds) has changed. static bool CompareParentProperty( const int32 ParentIndex, const FComparePropertiesSharedParams& SharedParams, FComparePropertiesStackParams& StackParams) { const FRepParentCmd& Parent = SharedParams.Parents[ParentIndex]; const bool bIsLifetime = EnumHasAnyFlags(Parent.Flags, ERepParentFlags::IsLifetime); // Active state of a property applies to *all* connections. // If the property is inactive, we can skip comparing it because we know it won't be sent. // Further, this will keep the last active state of the property in the shadow buffer, // meaning the next time the property becomes active it will be sent to all connections. #if 1 // workaround const bool bIsActive = !SharedParams.RepChangedPropertyTracker || SharedParams.RepChangedPropertyTracker->Parents[ParentIndex].Active || SharedParams.bIsInitial; #else const bool bIsActive = !SharedParams.RepChangedPropertyTracker || SharedParams.RepChangedPropertyTracker->Parents[ParentIndex].Active; #endif const bool bShouldSkip = !bIsLifetime || !bIsActive || (Parent.Condition == COND_InitialOnly && !SharedParams.bIsInitial);
[Link Removed]
Request a info about UE-127172 bug tracker
LS-0019-IS-PQR23 on the start of running UE4
I am not able to find world outliner how to enable it?
What property of the Slider is the image used when dragging?
What properties of the progress bar can be used for drag and drop highlighting?
How to achieve HLSL Multiple Render Target in Material blueprints?
How does UMG set overlapping layouts?
How to properly terminate the DoWork thread function in FAsyncTask?
What method is used to fill polygonal regions when drawing spline mesh at run time?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-119442 in the post.
4 |
Component | UE - Networking |
---|---|
Affects Versions | 4.25 |
Target Fix | 5.4 |
Fix Commit | 31269720 |
---|
Created | Jul 12, 2021 |
---|---|
Resolved | Sep 30, 2024 |
Updated | Nov 4, 2024 |