This commit is contained in:
vis2k 2023-03-16 15:38:14 +08:00
parent 441a3d256b
commit 5a19262a0e

View File

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using UnityEngine;
@ -29,10 +28,6 @@ public class ClientCube : MonoBehaviour
// going to give smooth results.
double localTimeline;
// catchup / slowdown adjustments are applied to timescale,
// to be adjusted in every update instead of when receiving messages.
double localTimescale = 1;
// we use EMA to average the last second worth of snapshot time diffs.
// manually averaging the last second worth of values with a for loop
// would be the same, but a moving average is faster because we only
@ -174,12 +169,5 @@ void OnGUI()
GUILayout.EndHorizontal();
GUILayout.EndArea();
}
void OnValidate()
{
// thresholds need to be <0 and >0
snapshotSettings.catchupNegativeThreshold = Math.Min(snapshotSettings.catchupNegativeThreshold, 0);
snapshotSettings.catchupPositiveThreshold = Math.Max(snapshotSettings.catchupPositiveThreshold, 0);
}
}
}