From 844fe69e11f8e2762585e2b383665cdad289d415 Mon Sep 17 00:00:00 2001 From: vis2k Date: Sun, 12 Mar 2023 22:50:43 +0800 Subject: [PATCH] fix: SnapshotInterpolation.TimelineClamp uses Mathd.Clamp for Unity 2020 support --- .../Mirror/Core/SnapshotInterpolation/SnapshotInterpolation.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Assets/Mirror/Core/SnapshotInterpolation/SnapshotInterpolation.cs b/Assets/Mirror/Core/SnapshotInterpolation/SnapshotInterpolation.cs index d36de8b2d..adf058995 100644 --- a/Assets/Mirror/Core/SnapshotInterpolation/SnapshotInterpolation.cs +++ b/Assets/Mirror/Core/SnapshotInterpolation/SnapshotInterpolation.cs @@ -8,7 +8,6 @@ // fholm: netcode streams // fakebyte: standard deviation for dynamic adjustment // ninjakicka: math & debugging -using System; using System.Collections.Generic; using System.Runtime.CompilerServices; @@ -130,7 +129,7 @@ public static double TimelineClamp( // outside of the area, we clamp. double lowerBound = targetTime - bufferTime; double upperBound = targetTime + bufferTime; - return Math.Clamp(localTimeline, lowerBound, upperBound); + return Mathd.Clamp(localTimeline, lowerBound, upperBound); } // call this for every received snapshot.