mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
This method seems pretty redundant, could just be called directly. (#677)
This commit is contained in:
parent
49f39f9c09
commit
40d2ec54e5
@ -13,7 +13,7 @@ public static class NetworkTime
|
||||
// average out the last few results from Ping
|
||||
public static int PingWindowSize = 10;
|
||||
|
||||
internal static double lastPingTime;
|
||||
static double lastPingTime;
|
||||
|
||||
|
||||
// Date and time when the application started
|
||||
@ -45,16 +45,11 @@ public static void Reset()
|
||||
offsetMax = double.MaxValue;
|
||||
}
|
||||
|
||||
internal static NetworkPingMessage GetPing()
|
||||
{
|
||||
return new NetworkPingMessage(LocalTime());
|
||||
}
|
||||
|
||||
internal static void UpdateClient()
|
||||
{
|
||||
if (Time.time - lastPingTime >= PingFrequency)
|
||||
{
|
||||
NetworkPingMessage pingMessage = GetPing();
|
||||
NetworkPingMessage pingMessage = new NetworkPingMessage(LocalTime());
|
||||
NetworkClient.Send(pingMessage);
|
||||
lastPingTime = Time.time;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user