From ca33b91460c93801544b244e6e85541fc5c6c23f Mon Sep 17 00:00:00 2001 From: JesusLuvsYooh <57072365+JesusLuvsYooh@users.noreply.github.com> Date: Thu, 17 Nov 2022 13:40:12 +0000 Subject: [PATCH] A define mistake, fixed Under 2021 support. (#3276) There is no HashCode.Combine in this function, so 2021 define is not needed. Removing the define brings back support for under Unity 2021's --- Assets/Mirror/Core/Tools/Vector3Long.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Assets/Mirror/Core/Tools/Vector3Long.cs b/Assets/Mirror/Core/Tools/Vector3Long.cs index f7b86ebdc..ef2e6725b 100644 --- a/Assets/Mirror/Core/Tools/Vector3Long.cs +++ b/Assets/Mirror/Core/Tools/Vector3Long.cs @@ -48,9 +48,6 @@ public Vector3Long(long x, long y, long z) public static Vector3Long operator *(long n, Vector3Long a) => new Vector3Long(a.x * n, a.y * n, a.z * n); -// Unity 2019/2020 don't have HashCode.Combine yet. -// this is only to avoid reflection. without defining, it works too. -#if UNITY_2021_3_OR_NEWER // == returns true if approximately equal (with epsilon). [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool operator ==(Vector3Long a, Vector3Long b) => @@ -60,7 +57,6 @@ public Vector3Long(long x, long y, long z) [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool operator !=(Vector3Long a, Vector3Long b) => !(a == b); -#endif // NO IMPLICIT System.Numerics.Vector3Long conversion because double<->float // would silently lose precision in large worlds.