Browse Source

Fixes in Sync Adjustment System

James Peret 2 years ago
parent
commit
70be972839

+ 1 - 1
Runtime/Client/ClientNetMsgController.cs

@@ -61,7 +61,7 @@ namespace KairoEngine.Multiplayer
         private void SendBufferedData()
         {
             if(sendMsgBuffer.Count == 0) return;
-            Debug.Log("Sending buffered data from client to server");
+            //Debug.Log("Sending buffered data from client to server");
             DataStreamWriter writer = new DataStreamWriter();
             client.m_Driver.BeginSend(client.m_Connection, out writer);
             writer.WriteUInt((uint)networkTick.tick); // Current Tick Header

+ 1 - 1
Runtime/Server/ServerNetMsgController.cs

@@ -47,7 +47,7 @@ namespace KairoEngine.Multiplayer
         {
             uint tick = stream.ReadUInt();
             uint msgCount = stream.ReadByte();
-            Debug.Log($"Receiving {msgCount} messages from client {clientId}");
+            //Debug.Log($"Receiving {msgCount} messages from client {clientId}");
             for (int i = 0; i < msgCount; i++)
             {
                 uint code = stream.ReadByte();

+ 1 - 0
Runtime/Server/ServerSyncAjustmentSystem.cs

@@ -74,6 +74,7 @@ namespace KairoEngine.Multiplayer
                 if(!serverIsRunning) return;
                 adjusting = true;
                 adjustmentIterationCount = 0;
+                pings = new List<PingData>();
                 schedualedjustmentCalculation();
             });
         }