You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 22, 2021. It is now read-only.
Console.WriteLine("WARNING: The header for this demo file is corrupted. TickRate, TickTime, ParsingProgress, CurrentTime will be 0 for the first 50 ticks. PlaybackFrames, PlaybackTicks, PlaybackTime will always be 0. HeaderCorrupted event triggered.");
536
+
Console.WriteLine("WARNING: The header for this demo file is corrupted. TickRate, TickTime, CurrentTime will be 0 for ticks at the start of the demo. ParsingProgress, PlaybackFrames, PlaybackTicks, PlaybackTime will always be 0. HeaderCorrupted event triggered.");
525
537
526
538
if(HeaderCorrupted!=null)
527
539
{
@@ -554,6 +566,25 @@ public void ParseToEnd(CancellationToken token)
554
566
}
555
567
}
556
568
569
+
privatevoidFixTickTime()
570
+
{
571
+
// at the beginning of demos the tickgap can be erratic, so make sure we have 10 consecutive that are the same
572
+
intgap=TickGaps[1]-TickGaps[0];
573
+
boolisConsecutive=true;
574
+
for(inti=1;i<TickGaps.Count-1;i++){
575
+
if(TickGaps[i+1]-TickGaps[i]!=gap)
576
+
{
577
+
TickGaps.Clear();
578
+
isConsecutive=false;
579
+
break;
580
+
}
581
+
}
582
+
583
+
if(isConsecutive){
584
+
_ticktime=gap*TickInterval;
585
+
}
586
+
}
587
+
557
588
/// <summary>
558
589
/// Parses the next tick of the demo.
559
590
/// </summary>
@@ -563,6 +594,15 @@ public bool ParseNextTick()
563
594
if(Header==null)
564
595
thrownewInvalidOperationException("You need to call ParseHeader first before you call ParseToEnd or ParseNextTick!");
0 commit comments