1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 02:24:12 +02:00

Fix hardcoded server class IDs

In hindsight, these are obviously different between games and shouldn't be hardcoded

Also clean up main function a bit, since the analyzer already uses packets there's no need to switch between `all`
This commit is contained in:
Yep 2022-12-28 17:56:14 -05:00
commit 138343c251
3 changed files with 156 additions and 170 deletions

View file

@ -38,11 +38,7 @@ fn main() -> Result<(), MainError> {
let (_, state) = parser.parse()?;
println!("{}", serde_json::to_string(&state)?);
} else {
let parser = if all {
DemoParser::new_all_with_analyser(demo.get_stream(), PlayerSummaryAnalyzer::new())
} else {
DemoParser::new_with_analyser(demo.get_stream(), PlayerSummaryAnalyzer::new())
};
let parser = DemoParser::new_with_analyser(demo.get_stream(), PlayerSummaryAnalyzer::new());
let (header, state) = parser.parse()?;
println!("{:?}", header);