fix: SnapshotInterpolation.TimelineClamp uses Mathd.Clamp for Unity 2020 support

This commit is contained in:
vis2k 2023-03-12 22:50:43 +08:00
parent cae12a43fc
commit 844fe69e11

View File

@ -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.