Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
fix uint64 mesh decoding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
parzivail committed Aug 4, 2021
1 parent 8a62d33 commit 4a58e73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RainbowForge/BinaryReaderExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public static Vector3 ReadUInt64AsPos(this BinaryReader r)
{
const float bias = 0x7FFF;

var x = r.ReadUInt16();
var y = r.ReadUInt16();
var z = r.ReadUInt16();
var s = r.ReadUInt16();
var x = (float) r.ReadInt16();
var y = (float) r.ReadInt16();
var z = (float) r.ReadInt16();
var s = (float) r.ReadInt16();

return new Vector3(x * s / bias, y * s / bias, z * s / bias);
}
Expand Down

0 comments on commit 4a58e73

Please sign in to comment.