Skip Owner replication via blueprint doesn't work on packaged project

UE 4.15.1 from source
VS2015
packaging for dedicated development server/development client
Nativization disabled (because if I leave it on it just breaks even more things)
C++ project (although all my programming is in blueprint)
Using a dedicated server
Packaging for windows64

I have some variables which are set to “skip owner” replication in blueprint, and while it works exactly how it should in PIE, in a live environment, it behaves as if it is set to default replication.

Want to test this yourself? Create this very simple blueprint. In PIE, it works exactly how you would expect: the client doesn’t get the updated variable from the server. In a packaged/live environment, the client is updated when it shouldn’t be.

http://puu.sh/vj6eN.jpg

1 Like

Hey cerdom,

I’ve reproduced your issue and have entered a bug report, which you can test using the link below:

Thank you for your report.

Have a great day

4.16.3 also suffers from this bug…

Hey swfly,

Thanks for the update. I’ve added that to the affected versions on the ticket.

Have a great day

FYI, I can confirm that this is still broken in Unreal 4.19, and has actually gotten worse: The “Simulated Only” condition also has the same problem (works in-Editor, but ignored in packaged build). Also, the Replication Condition seems to be completely ignored on a listen server (i.e. repNotify will fire no matter what) even in-Editor…

Thus far, there seems to be no workaround in-sight. My multiplayer game is flooded by extra network traffic that Remote Pawns need to detect and then discard.

Having this issue on 4.19.1 aswell.

Any work arounds for this one?

Hi Steven.W,

Unfortunately I’m not aware of any workarounds at this time.

Same bug on 4.19.2

I confirm the presence of the bug in 4.19.2

Thanks for the updates, this issue has not been resolved at this time so you can expect to see it in 4.19 & 4.20 Preview as well. We currently do not have a timeline for when a fix will be available for this.

Have a great day,

Sean

FYI we still see this in 4.21

This issue still applies to nativized blueprints in 4.24. Anyone have thoughts on how to fix that without disabling nativization?

EDIT, FIXED: Looks like nativized blueprints always use DOREPLIFETIME_DIFFNAMES for all their replicated variables, which completely throws out the replication condition. I did hack together a workaround by letting blueprints specify a list of variable names and their associated replication conditions that gets applied over the replication condition loaded by the engine, but it would be nice if this was handled properly by nativization itself. This should also be a sufficient solution for anybody not using Nativization but still on earlier engine versions before this was fixed in 4.23. I’ll reproduce my fix below (just make a C++ class inheriting from AActor, override GetLifeTimeReplicatedProps as below, and make blueprints thats need this behavior inherit from the C++ class and override GetVarReplicateConditionOverrides):

 void AMyNetActor::GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const
{
	UClass* OverrideClass = nullptr;
    // This is a struct of { FName VarName, TEnumAsByte<ELifetimeCondition> Condition }
	TArray<FRepConditionOverride> ConditionOverrides;
    // Blueprints override this to specify their class and an array of var names & replication conditions
    // Your blueprint just call Self->GetClass to provide the OverrideClass.
	GetVarReplicateConditionOverrides(OverrideClass, ConditionOverrides);

	for (const auto ConditionOverride : ConditionOverrides)
	{
            // Note that this will trigger a crash if you specify a property name that isn't found
		UProperty* FoundProperty = FindFieldChecked<UProperty>(OverrideClass, ConditionOverride.VarName);
		{
			for (int32 ii = 0; ii < FoundProperty->ArrayDim; ii++)
			{
				OutLifetimeProps.AddUnique(FLifetimeProperty(FoundProperty->RepIndex + ii, ConditionOverride.Condition));
			}
		}
	}

	Super::GetLifetimeReplicatedProps(OutLifetimeProps);
}

This is not working in the editor. OnRep Skip Owner, still is receiving the event in blueprints. Confirmed 2.26.1… Is worked around by adding, Is Locally Controlled check for me.

This is not working in the editor. OnRep Skip Owner, still is receiving the event in blueprints. Confirmed 2.26.1… Is worked around by adding, Is Locally Controlled check for me.

How hard is this to test? Come on! Be BETTER!!!