diff --git a/Assets/Mirror/Core/NetworkClient.cs b/Assets/Mirror/Core/NetworkClient.cs index c8f01205c..f9597ed1b 100644 --- a/Assets/Mirror/Core/NetworkClient.cs +++ b/Assets/Mirror/Core/NetworkClient.cs @@ -1598,8 +1598,8 @@ internal static void NetworkLateUpdate() // snapshots _but_ not every single tick. // // Unity 2019 doesn't have Time.timeAsDouble yet - if (!Application.isPlaying || - AccurateInterval.Elapsed(NetworkTime.localTime, sendInterval, ref lastSendTime)) + bool sendIntervalElapsed = AccurateInterval.Elapsed(NetworkTime.localTime, sendInterval, ref lastSendTime); + if (!Application.isPlaying || sendIntervalElapsed) { Broadcast(); } diff --git a/Assets/Mirror/Core/NetworkServer.cs b/Assets/Mirror/Core/NetworkServer.cs index 45d05aad9..845542285 100644 --- a/Assets/Mirror/Core/NetworkServer.cs +++ b/Assets/Mirror/Core/NetworkServer.cs @@ -2034,7 +2034,8 @@ internal static void NetworkLateUpdate() // NetworkTransform, so they can sync on same interval as time // snapshots _but_ not every single tick. // Unity 2019 doesn't have Time.timeAsDouble yet - if (!Application.isPlaying || AccurateInterval.Elapsed(NetworkTime.localTime, sendInterval, ref lastSendTime)) + bool sendIntervalElapsed = AccurateInterval.Elapsed(NetworkTime.localTime, sendInterval, ref lastSendTime); + if (!Application.isPlaying || sendIntervalElapsed) Broadcast(); }