public static void UpdateServerPerformance(ServerPerformance performance) { if (performance == null) { return; } Instance._serverPerformance = performance; }
private static void Send() { foreach (Peer peer in Network.Peers) { ServerPerformance performance = new ServerPerformance( PerformanceCapture.FrameRate, (float)peer.Statistics.PacketLossPercent / 100); peer.SendReliableUnordered(new NetworkPackage(PackageIdentification.ServerPerformance, performance)); } }