This commit is contained in:
mischa 2024-04-25 22:26:18 +08:00
parent 1fb4f3c079
commit 04016bdab4

View File

@ -355,7 +355,13 @@ void UpdateClient()
// first, see if there's a snapshot at blendingEndTime already. // first, see if there's a snapshot at blendingEndTime already.
// this would be super precise. // this would be super precise.
if (SnapshotInterpolation.TrySample(clientSnapshots, clientTimeline + blendingTime, out int from, out int to, out double t)) // returns false if there isn't any yet.
if (SnapshotInterpolation.TrySample(
clientSnapshots,
clientTimeline + blendingTime,
out int from,
out int to,
out double t))
{ {
// interpolate between from & to // interpolate between from & to
NTSnapshot fromSnapshot = clientSnapshots[from]; NTSnapshot fromSnapshot = clientSnapshots[from];