demofile-net icon indicating copy to clipboard operation
demofile-net copied to clipboard

`RoundStartTicks` not available

Open in0finite opened this issue 1 year ago • 2 comments

Research

  • [X] I've already searched and I could not find an existing issue or discussion about this issue.

Description

CDemoFileInfo.GameInfo?.Cs?.RoundStartTicks property is not available in any demo.

CDemoFileInfo.GameInfo is always null.

Code to reproduce

var stream = new MemoryStream(File.ReadAllBytes(path));

var demo = new DemoParser();

demo.DemoEvents.DemoFileInfo += e =>
{
    Console.WriteLine($"DemoFileInfo:\n");

    var jsonSerializerOptions = new JsonSerializerOptions() { WriteIndented = true };
    string jsonStr = JsonSerializer.Serialize(e, jsonSerializerOptions);

    Console.WriteLine($"RoundStartTicks: {e.GameInfo?.Cs?.RoundStartTicks?.Count}\n");
    Console.WriteLine(jsonStr);

    Console.WriteLine($"\n");
};

await demo.ReadAllAsync(stream);

Affected demos

No response

in0finite avatar Jul 29 '24 16:07 in0finite

Thanks for reporting. Is this data available in other parsers?

saul avatar Aug 01 '24 18:08 saul

I didn't check other parsers. I don't know if any parser actually reads CDemoFileInfo. I just assumed that data is there, to accelerate seeking through rounds.

in0finite avatar Aug 02 '24 01:08 in0finite

I'm going to assume that this data simply isn't in the demo files - please reopen if you can parse this data with another parser. Thanks

saul avatar Sep 07 '24 09:09 saul