PredictiveSynchronizationExample is currently not working. A quick initial investigation leads me to believe something is going wrong during replication of members for the actor class. I did check the replicator and we are sending out Rset calls to the PredictiveActor but the variables are not being updated.
I think this is because the client recieves updates for some future game tick but since the game is paused we never get there. The solution is probably to put the replicator into a special state during initial synchronization so that game ticks are ignored during initial synchronization
The PredictiveActor implements the IMDSynchronizedNode interface. The implementation blocks synchronization until all of the networked member variables have been updated.
public bool IsSynchronizationComplete()
{
if (Speed == 0f || Direction == Vector2.Zero)
{
// Fake that we are taking variable time to synch
FinishSynchAt = OS.GetTicksMsec() + (uint)Random.RandiRange(500, 8000);
return false;
}
if (OS.GetTicksMsec() < FinishSynchAt)
{
return false;
}
return true;
}
PredictiveSynchronizationExample is currently not working. A quick initial investigation leads me to believe something is going wrong during replication of members for the actor class. I did check the replicator and we are sending out Rset calls to the PredictiveActor but the variables are not being updated.
I think this is because the client recieves updates for some future game tick but since the game is paused we never get there. The solution is probably to put the replicator into a special state during initial synchronization so that game ticks are ignored during initial synchronization
The PredictiveActor implements the
IMDSynchronizedNode
interface. The implementation blocks synchronization until all of the networked member variables have been updated.