tidy up syncreport so it's just the interesting frame
This commit is contained in:
@@ -244,14 +244,18 @@ namespace OpenRA
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DumpSyncReport()
|
public static void DumpSyncReport( int frame )
|
||||||
{
|
{
|
||||||
foreach (var f in syncReports)
|
var f = syncReports.FirstOrDefault(a => a.First == frame);
|
||||||
|
if (f == null)
|
||||||
{
|
{
|
||||||
|
Log.Write("No sync report available!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Log.Write("Sync for net frame {0} -------------", f.First);
|
Log.Write("Sync for net frame {0} -------------", f.First);
|
||||||
Log.Write("{0}", f.Second);
|
Log.Write("{0}", f.Second);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static void Tick()
|
public static void Tick()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ namespace OpenRA.Network
|
|||||||
{
|
{
|
||||||
if (packet.Length != existingSync.Length)
|
if (packet.Length != existingSync.Length)
|
||||||
{
|
{
|
||||||
Game.DumpSyncReport();
|
Game.DumpSyncReport(frame);
|
||||||
OutOfSync(frame);
|
OutOfSync(frame);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -126,7 +126,7 @@ namespace OpenRA.Network
|
|||||||
{
|
{
|
||||||
if (packet[i] != existingSync[i])
|
if (packet[i] != existingSync[i])
|
||||||
{
|
{
|
||||||
Game.DumpSyncReport();
|
Game.DumpSyncReport(frame);
|
||||||
|
|
||||||
if (i < SyncHeaderSize)
|
if (i < SyncHeaderSize)
|
||||||
OutOfSync(frame, "Tick");
|
OutOfSync(frame, "Tick");
|
||||||
|
|||||||
Reference in New Issue
Block a user