]> git.deb.at Git - rhonda/impostor.git/commitdiff
Revert changes
authorAeonLucid <aeonlucid@gmail.com>
Fri, 16 Oct 2020 05:08:53 +0000 (07:08 +0200)
committerAeonLucid <aeonlucid@gmail.com>
Sun, 18 Oct 2020 19:17:41 +0000 (21:17 +0200)
src/Impostor.Server/GameData/Objects/Components/InnerCustomNetworkTransform.cs

index e8c151c29cda1bae09f06da66406ef2214629f37..013d666fd1c42f68949adf08cb4d11eefc207509 100644 (file)
@@ -63,13 +63,10 @@ namespace Impostor.Server.GameData.Objects.Components
 
         public static Vector2 ReadVector2(IMessageReader reader)
         {
-            var v = (float) (int) reader.ReadUInt16() / 65535f;
-            var v2 = (float) (int) reader.ReadUInt16() / 65535f;
+            var v1 = (float) reader.ReadUInt16() / (float) ushort.MaxValue;
+            var v2 = (float) reader.ReadUInt16() / (float) ushort.MaxValue;
 
-            var v3 = XRange.Lerp(v);
-            var v4 = YRange.Lerp(v2);
-
-            return new Vector2(v3, v4);
+            return new Vector2(XRange.Lerp(v1), YRange.Lerp(v2));
         }
     }
 }
\ No newline at end of file