From 3c5869203d9d2ca705b3bdef2736517aa08747b7 Mon Sep 17 00:00:00 2001 From: mischa Date: Fri, 18 Oct 2024 12:56:00 +0200 Subject: [PATCH] naming --- .../NetworkTransform/NetworkTransformHybrid2022.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs b/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs index 34906f2ab..a59708b2b 100644 --- a/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs +++ b/Assets/Mirror/Components/NetworkTransform/NetworkTransformHybrid2022.cs @@ -61,8 +61,7 @@ public class NetworkTransformHybrid2022 : NetworkBehaviour [Tooltip("Ocassionally send a full reliable state to delta compress against. This only applies to Components with SyncMethod=Unreliable.")] public int baselineRate = 1; public float baselineInterval => baselineRate < int.MaxValue ? 1f / baselineRate : 0; // for 1 Hz, that's 1000ms - double lastServerBaselineTime; - double lastClientUnreliableTime; + double lastBaselineTime; // delta compression needs to remember 'last' to compress against. // this is from reliable full state serializations, not from last @@ -250,7 +249,7 @@ void SerializeServerBaseline(NetworkWriter writer, Vector3 position, Quaternion // included in baseline to identify which one it was on client // included in deltas to ensure they are on top of the correct baseline lastSerializedBaselineTick = frameCount; - lastServerBaselineTime = NetworkTime.localTime; + lastBaselineTime = NetworkTime.localTime; // set 'last' lastPosition = position; @@ -500,7 +499,7 @@ protected virtual void OnServerToClientDeltaSync(byte baselineTick, Vector3? pos void UpdateServerBaseline(double localTime) { // send a reliable baseline every 1 Hz - if (localTime >= lastServerBaselineTime + baselineInterval) + if (localTime >= lastBaselineTime + baselineInterval) { // perf: get position/rotation directly. TransformSnapshot is too expensive. // TransformSnapshot snapshot = ConstructSnapshot();