mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-17 18:40:33 +00:00
NetworkClient/Server Broadcast: make this easier to read
This commit is contained in:
parent
bb552f8a54
commit
0c213fbce4
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user