Exemple #1
0
        private void PrintTrace(SyncInfo local, SyncInfo remote)
        {
            Log.Message($"Printing {local.traces.Count} traces");

            int diffAt = -1;
            int count  = Math.Min(local.traceHashes.Count, remote.traceHashes.Count);

            for (int i = 0; i < count; i++)
            {
                if (local.traceHashes[i] != remote.traceHashes[i])
                {
                    diffAt = i;
                    break;
                }
            }

            if (diffAt == -1)
            {
                diffAt = count;
            }

            File.WriteAllText("local_traces.txt", local.TracesToString(diffAt - 40, diffAt + 40));
            Multiplayer.Client.Send(Packets.Client_Debug, local.startTick, diffAt - 40, diffAt + 40);
        }
Exemple #2
0
 private void PrintTrace(SyncInfo local, SyncInfo remote)
 {
     File.WriteAllText("host_traces.txt", local.TracesToString());
     Multiplayer.Client.Send(Packets.Client_Debug, local.startTick);
 }