Description

It seems like if replication is re-enabled for a given property, its state should be force synced (depending on replication conditions). Otherwise, the state will remain "out of sync" for an indeterminate amount of time (until the property is changed again).

Steps to Reproduce

The controls for the project are as follows:

1 -> Possess the first pawn.
2 -> Possess the second pawn.
6 -> Posses Original pawn (i.e. pawn spawned with client).

Shift + 1 -> Randomize the values for the first pawn.
Shift + 2 -> Randomize the values for the second pawn.
Shift + 6 -> Randomize the values for the Original pawn.
Shift + 7 -> Randomize the values for all non-Original pawns.
Shift + 0 -> Randomize the values for the currently possessed pawn.

Shift + Ctrl + 1 -> Print the values for the first pawn.
Shift + Ctrl + 2 -> Print the values for the second pawn.
Shift + Ctrl + 6 -> Print the values for the Original Pawn.
Shift + Ctrl + 0 -> Print values for the currently possessed pawn.

  1. Download the attached project.
  2. Use a dedicated server, 2 Players, and PIE.
  3. Verify that OnReps are only called for the Owned pawn on each client.
  4. Print Values for pawns 1 and 2 on each client. They should report default values.
  5. On Client1 Possess Pawn 1 and Print Values for it.
  6. On Client2 Print Values for Pawn 1.

EXPECTED:
Printing Values will show non-default values for Client1, but default values for Client2.
OnReps will have been called corresponding to the values that were updated on Client1.
No OnReps will have been called on Client2.

ACTUAL:
Printing Values will show default values.
OnReps will not be called on either Client1 or 2.

  1. On Client1 Possess Pawn 2.
  2. On Client2 Possess Pawn1 and Print Values for it.

EXPECTED:
Printing Values will show non-default values.
OnReps will have been called corresponding to the values that were updated.

ACTUAL:
Printing Values will show default values.
OnReps will not be called.

  1. Randomize values for Pawn1 and Pawn2 using either client.
  2. From Client1 PrintValues for Pawn1.
  3. From Client1 PrintValues for Pawn2.
  4. From Client2 PrintValues for Pawn1.
  5. From Client2 PrintValues for Pawn2.
  6. Perform the following sequence to swap possession: Client1 Possess Original Pawn, Client2 Possess Original Pawn, Client1 Possess Pawn1, Client2 Possess Pawn2.
  7. From Client1 PrintValues for Pawn1.
  8. From Client1 PrintValues for Pawn2.
  9. From Client2 PrintValues for Pawn1.
  10. From Client2 PrintValues for Pawn2.

EXPECTED:
OnReps for Pawn1 will have been called on Client2 when the values were randomized.
OnReps for Pawn2 will have been called on Client1 when the values were randomized.

Before Swapping, PrintValues for Pawn1 will show up to date values for Client2, and out of date values for Client1.

Before Swapping, PrintValues for Pawn2 will show up to date values for Client1, and out of date values for Client2.

After Swapping, OnReps for Pawn1 will have been called on Client1.
After Swapping, OnReps for Pawn2 will have been called on Client2.

After Swapping, PrintValues for Pawn1 and Pawn2 will show up to date values for both Client1 and Client2.

ACTUAL:
OnReps for Pawn1 will have been called on Client2 when the values were randomized.
OnReps for Pawn2 will have been called on Client1 when the values were randomized.

Before Swapping, PrintValues for Pawn1 will show up to date values for Client2, and out of date values for Client1.

Before Swapping, PrintValues for Pawn2 will show up to date values for Client1, and out of date values for Client2.

After Swapping, OnReps for Pawn1 will *NOT* have been called on Client1.
After Swapping, OnReps for Pawn2 will *NOT* have been called on Client2.

After Swapping, PrintValues for Pawn1 will *ONLY* show up to date values for Client2.
After Swapping, PrintValues for Pawn2 will *ONLY* show up to date values for Client1.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-43135 in the post.

6
Login to Vote

Fixed
ComponentUE - Networking
Affects Versions4.144.154.16
Target Fix4.22
Fix Commit4732876
Main Commit4804559
Release Commit4862694
CreatedMar 21, 2017
ResolvedJan 16, 2019
UpdatedOct 19, 2020