mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
fix bspdecal reading
This commit is contained in:
parent
1b9befd165
commit
a2ab109b88
2 changed files with 2 additions and 2 deletions
|
|
@ -29,7 +29,7 @@ impl BitRead<LittleEndian> for BSPDecalMessage {
|
|||
|
||||
let texture_index = stream.read_sized(9)?;
|
||||
let (ent_index, model_index): (u16, u16) = if stream.read()? {
|
||||
(stream.read_sized(11)?, stream.read_sized(12)?)
|
||||
(stream.read_sized(12)?, stream.read_sized(12)?)
|
||||
} else {
|
||||
(0, 0)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ pub fn read_bit_coord(stream: &mut Stream) -> ReadResult<f32> {
|
|||
0
|
||||
};
|
||||
let frac_val: u8 = if has_frac { stream.read_sized(5)? } else { 0 };
|
||||
let value = int_val as f32 + (frac_val as f32 * (1f32 / 32f32));
|
||||
let value = int_val as f32 + (frac_val as f32 * get_frac_factor(5));
|
||||
value * sign
|
||||
} else {
|
||||
0f32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue