1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 02:24:12 +02:00
This commit is contained in:
Robin Appelman 2019-03-02 22:33:22 +01:00
commit f2650dc32f
19 changed files with 3614 additions and 2210 deletions

View file

@ -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,
})
}
}
}