fix: server doesn't overwrite client authority sync points

This commit is contained in:
miwarnec 2024-11-04 11:59:38 +01:00
parent 6ece0c7d71
commit 6d6d31b202

View File

@ -684,8 +684,13 @@ void UpdateServer()
// should we broadcast at all?
if (!disableSendingThisToClients) // CUSTOM CHANGE: see comment at definition
{
UpdateServerBaseline(localTime);
UpdateServerDelta(localTime);
// only broadcast for server owned objects.
// otherwise server would overwrite ClientToServer object's baselines.
if (syncDirection == SyncDirection.ServerToClient || IsClientWithAuthority)
{
UpdateServerBaseline(localTime);
UpdateServerDelta(localTime);
}
}
// interpolate remote clients