Small fix

This commit is contained in:
2026-01-08 19:51:11 +01:00
parent 14fc9ea576
commit af87ffea42
2 changed files with 160 additions and 160 deletions

View File

@@ -78,14 +78,14 @@ public class TestBall : SyncedObject
private void SetProgress(float progress)
{
var currentTimestamp = GetCurrentTimestamp();
loopOffset = currentTimestamp - progress * LoopTime;
loopOffset = (currentTimestamp - progress) * LoopTime;
}
private float GetProgress()
{
var currentTimestamp = GetCurrentTimestamp();
//Debug.Log($"CurrentTimeStamp for mode {mode}: {currentTimestamp}");
return currentTimestamp - loopOffset % LoopTime / LoopTime;
return (currentTimestamp - loopOffset) % LoopTime / LoopTime;
}
private float GetCurrentTimestamp()