saul / demofile-net

Blazing fast cross-platform demo parser library for Counter-Strike 2 and Valve's Deadlock, written in C#.
MIT License
111 stars 10 forks source link

`RoundStartTicks` not available #73

Closed in0finite closed 2 months ago

in0finite commented 3 months ago

Research

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

saul commented 3 months ago

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

in0finite commented 3 months ago

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.

saul commented 2 months ago

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