From 5319ae72f961534049551a1394b28a6cffc339f9 Mon Sep 17 00:00:00 2001
From: Max G <clonet1019@gmail.com>
Date: Tue, 29 Jan 2019 04:25:33 -0600
Subject: [PATCH] Fixed an error with the CFrame orientation.

---
 BinaryFormat/ChunkTypes/PROP.cs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/BinaryFormat/ChunkTypes/PROP.cs b/BinaryFormat/ChunkTypes/PROP.cs
index 36afbd6..8f395b1 100644
--- a/BinaryFormat/ChunkTypes/PROP.cs
+++ b/BinaryFormat/ChunkTypes/PROP.cs
@@ -212,17 +212,17 @@ namespace Roblox.BinaryFormat.Chunks
 
                     loadProperties(i =>
                     {
-                        int normalXY = reader.ReadByte();
+                        int normXY = reader.ReadByte();
 
-                        if (normalXY > 0)
+                        if (normXY > 0)
                         {
                             // Make sure this value is in a safe range.
-                            normalXY = (normalXY - 1) % 36;
+                            normXY = (normXY - 1) % 36;
 
-                            NormalId normX = (NormalId)((normalXY - 1) / 6);
+                            NormalId normX = (NormalId)(normXY / 6);
                             Vector3 R0 = Vector3.FromNormalId(normX);
 
-                            NormalId normY = (NormalId)((normalXY - 1) % 6);
+                            NormalId normY = (NormalId)(normXY % 6);
                             Vector3 R1 = Vector3.FromNormalId(normY);
 
                             // Compute R2 using the cross product of R0 and R1.
@@ -432,4 +432,4 @@ namespace Roblox.BinaryFormat.Chunks
             reader.Dispose();
         }
     }
-}
\ No newline at end of file
+}