StatsHelix / demoinfo

A library to analyze CS:GO demos in C#
MIT License
322 stars 78 forks source link

Rounds which do not end #102

Closed AyukJason closed 8 years ago

AyukJason commented 8 years ago

Hello, I have discovered a number of rounds which do not end, specifically the first three rounds. Take a look at this output:

Started Round number: 1 Started Round number: 2 Started Round number: 3 Ended Round number : 3 Started Round number: 4 Started Round number: 5 Started Round number: 6 Started Round number: 7 Ended Round number : 7 Started Round number: 8 Ended Round number : 8 Started Round number: 9 Ended Round number : 9 Started Round number: 10 Ended Round number : 10 Started Round number: 11 Ended Round number : 11 Started Round number: 12 Ended Round number : 12 Started Round number: 13 Ended Round number : 13 Started Round number: 14 Ended Round number : 14 Started Round number: 15 Ended Round number : 15 Started Round number: 16 Ended Round number : 16 Started Round number: 17 Ended Round number : 17 Started Round number: 18 Ended Round number : 18 Started Round number: 19 Ended Round number : 19 Started Round number: 20 Ended Round number : 20 Started Round number: 21 Ended Round number : 21 Started Round number: 22 Ended Round number : 22 Started Round number: 23 Ended Round number : 23 Started Round number: 24 Ended Round number : 24 Started Round number: 25 Ended Round number : 25 Started Round number: 26 Ended Round number : 26 Started Round number: 27 Ended Round number : 27 Started Round number: 28 Ended Round number : 28 Started Round number: 29 Ended Round number : 29 Started Round number: 30 Ended Round number : 30 Started Round number: 31

AyukJason commented 8 years ago

In that output The string "Started Round number: x" is printed in the parser.RoundStart event while the string "Ended Round number: x" is printed in the parser.RoundEnd event. As you can see, there are rounds which do not end, and statistics based on rounds data is thus erroneous. For example: Rounds 1, 2, 4, 5, 6 do not end.

main-- commented 8 years ago

This is not a bug. The round start and round end events are generated by the server, we just parse them. It's perfectly possible for a demo to have rounds which don't end or even rounds that never start and there's nothing we can do about it. Sorry.

AyukJason commented 8 years ago

ok thanks

Calak commented 8 years ago

So, maybe generate a round end if a round start with no previous end occurs?

moritzuehling commented 8 years ago

Out of the scope of this library in my opinion. It might be interesting ti create a demoino-convenient project, that abstracts demoinfo, and fixes this kind of stuff.

main-- commented 8 years ago

So, maybe generate a round end if a round start with no previous end occurs?

Out of the scope of this library in my opinion.

More than that, it would also be wrong. DemoInfo's job is parsing demo files. If a demo file contains weird data and there simply is no correct way to automatically handle it (like here), then downstream code is going to get broken data from us anyways. Because of that, it's much better to be honest with them so they can try to make the best of it.