mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
minor speedups
This commit is contained in:
parent
a333e26a6d
commit
b9a92be010
2 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ use crate::{ReadResult, Stream};
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct ConsoleCmdPacket {
|
pub struct ConsoleCmdPacket {
|
||||||
tick: u32,
|
tick: u32,
|
||||||
command: LazyBitReadSized<String, LittleEndian>,
|
command: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BitRead<LittleEndian> for ConsoleCmdPacket {
|
impl BitRead<LittleEndian> for ConsoleCmdPacket {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ impl BitRead<LittleEndian> for UserCmdPacket {
|
||||||
let tick = stream.read()?;
|
let tick = stream.read()?;
|
||||||
let sequence_out = stream.read()?;
|
let sequence_out = stream.read()?;
|
||||||
let len: u32 = stream.read()?;
|
let len: u32 = stream.read()?;
|
||||||
let mut _packet_data = stream.read_bits(len as usize * 8)?;
|
let _ = stream.skip(len as usize * 8)?;
|
||||||
// TODO parse the packet data
|
// TODO parse the packet data
|
||||||
Ok(UserCmdPacket { tick, sequence_out })
|
Ok(UserCmdPacket { tick, sequence_out })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue