There is some side effects to the fact that you made AttachmentReplication private in 4.11.
I clearly udnerstand the purpose of it and I approve this change but we are not able to provide an alternative way to GatherCurrentMovement() and use an optimized ReplicatedMovement Struct.
We follow something similar to UT 4 to optimize our bandwith. The Struct has clearly less property replicated and we can also use some property to hold multiple data that we can split once receive on client side.
Is it possible to create a call to an external function in the “else” part where you are setting ReplicatedMovement.location and ReplicatedMovement.Rotation etc…?
By doing this, we can override this part only to use our own struct and keep using the changes that you made.
In this function, by default, you will put the line 275 to 278. By doing this, we will be able to create a new stuct to manage RepMovement that can be lighter (cf UT one) and set our value by overriding the virtual function.
There might be another approach that you may propose but the goal is to be able to not “send” non used data during Movement Replication. This will save bandwitdh. For example, if you are craeting a game with no Physics at all, the AngularVelocity is never used, so you can save some bit by not sending Zero vector at each repmovement.
As per my network understanding, the RepMovement Struc is fully replicated each time and not only the value that have changed. This is why we can expect bandwith saving by doing this.
FActorTransactionAnnotation, the class where GatherCurrentMovement() is declared, is not exposed to the engine. You can try making the class a UCLASS and add ENGINE_API. This should allow you to call the GatherCurrentMovement() function directly.
What you’re referring to is the definition of the function. The declaration is made in Actor.h in the FActorTransactionAnnotation class, roughly around line 1441 depending on which engine version you are using (checked in 4.11 Release).
Thanks for the clarification. But I don’t thinks this will solve my issue.
In fact, I can’t rewrite GatherCurrentMovement() because AttachmentReplication has been made private so I can’t override this function and do something else in some part of the logic.
I only need access to some extent at the line 275 to 278 and keep the other part as is.
My question is more, are you willing to take this approach and allow RepMovement improvment with Launcher version or do you consider this as a no way decision on your side and expect us to use GitHub engine to manage this case.
Where are you seeing GatherCurrentMovement() being declared as private? When I look at the function declaration in Actor.h, it is under a Public: specifier.
“we are not able to provide an alternative way to GatherCurrentMovement() and use an optimized ReplicatedMovement Struct.” I find this quote somewhat confusing. Did you have an alternative prior to the change in 4.11? What do you mean by an optimized ReplicatedMovement? In what way is it optimized?
What do you mean by the last paragraph of your original question? It sounds to me like you are specifically trying to override the else statement of a function, rather than the entire function.