saul / demofile-net

Blazing fast cross-platform demo parser library for Counter-Strike 2, written in C#.
MIT License
76 stars 7 forks source link

GOTV+ Broadcasting #53

Open BeepIsla opened 3 months ago

BeepIsla commented 3 months ago

Hey,

same feature request as the old S1 parser https://github.com/saul/demofile/issues/373

The broadcast URLs for the current major are https://cstv.challengermode.com/major/primary and https://cstv.challengermode.com/major/secondary

I assume its almost identical to the CSGO one, convars are all the same at least

saul commented 3 months ago

Hi, thanks for the suggestion.

WIP PR for this here: https://github.com/saul/demofile-net/pull/54

The protocol is different but it wasn't too hard to reverse engineer. I can't test it fully as I think the stream finished a couple of hours ago.

Give it a shot and let me know how you get on.

BeepIsla commented 3 months ago

Thanks for the most part it seems to work except I do not seem to receive any Source1GameEvents events, might be just due to how CSTV broadcasting works? I receive other events though such as EntityEvents, GameEvents, and PacketEvents. I am able to read the game state fine (Rounds played, team scores, players, etc)

saul commented 3 months ago

It's very possible that legacy Source 1 game events aren't available in CS2 broadcasts.

LaihoE commented 3 months ago

I tried parsing the broadcast myself and I'm seeing a bunch of GE_Source1LegacyGameEvent being fired :thinking: Maybe they fixed it?

BeepIsla commented 3 months ago

Seems like only some events don't fire, like RoundEnd. RoundOfficiallyEnded and PlayerDeath do work for example. Not sure which ones specifically work and don't work.