mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-04 02:24:12 +02:00
format
This commit is contained in:
parent
8183ac5b65
commit
f2650dc32f
19 changed files with 3614 additions and 2210 deletions
|
|
@ -52,7 +52,11 @@ impl BitRead<LittleEndian> for ParseSoundsMessage {
|
|||
fn read(stream: &mut Stream) -> ReadResult<Self> {
|
||||
let reliable = stream.read()?;
|
||||
let num = if reliable { 1u8 } else { stream.read()? };
|
||||
let length = if reliable { stream.read_sized::<u16>(8)? } else { stream.read()? };
|
||||
let length = if reliable {
|
||||
stream.read_sized::<u16>(8)?
|
||||
} else {
|
||||
stream.read()?
|
||||
};
|
||||
let data = stream.read_sized(length as usize)?;
|
||||
|
||||
Ok(ParseSoundsMessage {
|
||||
|
|
@ -62,4 +66,4 @@ impl BitRead<LittleEndian> for ParseSoundsMessage {
|
|||
data,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue