3 releases
0.2.2 | Feb 7, 2025 |
---|---|
0.2.1 | Feb 5, 2025 |
0.2.0 | Dec 8, 2024 |
#1 in #goldsrc
314 downloads per month
195KB
5.5K
SLoC
dem
A complete GoldSrc demo parser and writer library
Example
let mut demo = open_demo("./src/tests/demotest.dem").unwrap();
for entry in &mut demo.directory.entries {
for frame in &mut entry.frames {
if let FrameData::NetworkMessage(ref mut box_type) = &mut frame.frame_data {
let data = &mut box_type.as_mut().1;
if let MessageData::Parsed(messages) = &mut data.messages {
messages.push(NetMessage::EngineMessage(Box::new(EngineMessage::SvcBad)));
};
}
}
}
demo.write_to_file("./src/tests/demo2test.dem").unwrap();
Acknowledgement
Dependencies
~2MB
~44K SLoC