From 042fca22587e4e58d8331751e79b12f2bf77aad6 Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Tue, 5 Nov 2024 12:08:06 -0500 Subject: [PATCH] Removed DisableSendingThisToClients --- .../NetworkTransformHybrid2022.cs | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs b/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs index 1cd232e19..2bacb94ce 100644 --- a/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs +++ b/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs @@ -25,8 +25,7 @@ public enum Settings Nothing, OnlySyncOnChange = 1 << 0, UnreliableRedundancy = 1 << 1, - BaselineIsDelta = 1 << 2, - DisableSendingThisToClients = 1 << 3 + BaselineIsDelta = 1 << 2 } [Flags] @@ -117,7 +116,6 @@ public enum DebugOptions bool onlySyncOnChange => settings.HasFlag(Settings.OnlySyncOnChange); bool unreliableRedundancy => settings.HasFlag(Settings.UnreliableRedundancy); bool baselineIsDelta => settings.HasFlag(Settings.BaselineIsDelta); - bool disableSendingThisToClients => settings.HasFlag(Settings.DisableSendingThisToClients); // sensitivity is for changed-detection, // this is != precision, which is for quantization and delta compression. @@ -138,11 +136,6 @@ public enum DebugOptions //public bool syncRotation = true; //public bool syncScale = false; - //// BEGIN CUSTOM CHANGE ///////////////////////////////////////////////// - //// TODO rename to avoid double negative - //public bool disableSendingThisToClients = false; - //// END CUSTOM CHANGE /////////////////////////////////////////////////// - //// debugging /////////////////////////////////////////////////////////// //[Header("Debug")] //public bool debugDraw; @@ -1010,12 +1003,9 @@ void UpdateServer() // perf: only grab NetworkTime.localTime property once. double localTime = NetworkTime.localTime; - // should we broadcast at all? - if (!disableSendingThisToClients) // CUSTOM CHANGE: see comment at definition - { - UpdateServerBaseline(localTime); - UpdateServerDelta(localTime); - } + // broadcast + UpdateServerBaseline(localTime); + UpdateServerDelta(localTime); // interpolate remote clients UpdateServerInterpolation(); @@ -1253,6 +1243,7 @@ void UpdateClient() } } + // Update() without LateUpdate() split: otherwise perf. is cut in half! void Update() { // if server then always sync to others.