From 6d6d31b2029db5b28fe306d2ea7d9251f9814576 Mon Sep 17 00:00:00 2001 From: miwarnec Date: Mon, 4 Nov 2024 11:59:38 +0100 Subject: [PATCH] fix: server doesn't overwrite client authority sync points --- .../NetworkTransform/NetworkTransformHybrid2022.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs b/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs index ad9498fd0..309c384b6 100644 --- a/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs +++ b/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs @@ -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