Files
csdemo/examples/ancient-noentity.rs
Lol3rrr c1568c4c07 Add basic example for parsing the ancient demos with and without entities
This was mainly done to both start having some examples and try out the API.
They also serve as a starting point for benchmarking
2024-09-22 17:13:14 +02:00

13 lines
490 B
Rust

const DATA: &[u8] = include_bytes!("../testfiles/de_ancient.dem");
fn main() {
let container = csdemo::Container::parse(DATA).unwrap();
let output = csdemo::parser::parse(csdemo::FrameIterator::parse(container.inner), csdemo::parser::EntityFilter::disabled()).unwrap();
println!("Header: {:?}", output.header);
println!("Players: {:?}", output.player_info);
println!("Events: {:?}", output.events.len());
println!("Entities: {:?}", output.entity_states.len());
}