mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkTime: more readable ping interval check
This commit is contained in:
parent
08fa0269de
commit
a463d48681
@ -92,7 +92,7 @@ public static void ResetStatics()
|
|||||||
internal static void UpdateClient()
|
internal static void UpdateClient()
|
||||||
{
|
{
|
||||||
// localTime (double) instead of Time.time for accuracy over days
|
// localTime (double) instead of Time.time for accuracy over days
|
||||||
if (localTime - lastPingTime >= PingFrequency)
|
if (localTime >= lastPingTime + PingFrequency)
|
||||||
{
|
{
|
||||||
NetworkPingMessage pingMessage = new NetworkPingMessage(localTime);
|
NetworkPingMessage pingMessage = new NetworkPingMessage(localTime);
|
||||||
NetworkClient.Send(pingMessage, Channels.Unreliable);
|
NetworkClient.Send(pingMessage, Channels.Unreliable);
|
||||||
|
Loading…
Reference in New Issue
Block a user