1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-05 02:54:10 +02:00

fix bspdecal reading

This commit is contained in:
Robin Appelman 2019-08-22 21:24:27 +02:00
commit a2ab109b88
2 changed files with 2 additions and 2 deletions

View file

@ -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