mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
logs
This commit is contained in:
parent
ab200a57ab
commit
774ae4f5b7
@ -283,7 +283,7 @@ public static SnapshotMode StepTime<T>(
|
|||||||
localTimeline += deltaTime * catchupMultiplier;
|
localTimeline += deltaTime * catchupMultiplier;
|
||||||
// but clamp so it never gets too far behind.
|
// but clamp so it never gets too far behind.
|
||||||
localTimeline = Math.Max(localTimeline, targetTime - bufferTime);
|
localTimeline = Math.Max(localTimeline, targetTime - bufferTime);
|
||||||
Debug.LogWarning($"clamp behind: time={localTimeline:F3} target={targetTime:F3} bufferTime={bufferTime:F3} drift={drift:F3}");
|
Debug.LogWarning($"clamp behind: time={localTimeline:F3} target={targetTime:F3} bufferTime={bufferTime:F3} snaps={buffer.Count} drift={drift:F3}");
|
||||||
return SnapshotMode.ClampBehind;
|
return SnapshotMode.ClampBehind;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,15 +294,15 @@ public static SnapshotMode StepTime<T>(
|
|||||||
localTimeline += deltaTime * slowdownMultiplier;
|
localTimeline += deltaTime * slowdownMultiplier;
|
||||||
// but clamp so it never gets too far ahead.
|
// but clamp so it never gets too far ahead.
|
||||||
localTimeline = Math.Min(localTimeline, targetTime + bufferTime);
|
localTimeline = Math.Min(localTimeline, targetTime + bufferTime);
|
||||||
Debug.LogWarning($"clamp ahead: time={localTimeline:F3} target={targetTime:F3} bufferTime={bufferTime:F3} drift={drift:F3}");
|
Debug.LogWarning($"clamp ahead: time={localTimeline:F3} target={targetTime:F3} bufferTime={bufferTime:F3} snaps={buffer.Count} drift={drift:F3}");
|
||||||
return SnapshotMode.ClampAhead;
|
return SnapshotMode.ClampAhead;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
// just a little behind: move by delta time and accelerate n%.
|
// just a little behind: move by delta time and accelerate n%.
|
||||||
if (drift > bufferTime / 2)
|
if (drift > bufferTime / 2)
|
||||||
{
|
{
|
||||||
localTimeline += deltaTime * catchupMultiplier;
|
localTimeline += deltaTime * catchupMultiplier;
|
||||||
Debug.LogWarning($"catchup: time={localTimeline:F3} target={targetTime:F3} bufferTime={bufferTime:F3} drift={drift:F3}");
|
Debug.LogWarning($"catchup: time={localTimeline:F3} target={targetTime:F3} bufferTime={bufferTime:F3} snaps={buffer.Count} drift={drift:F3}");
|
||||||
return SnapshotMode.Catchup;
|
return SnapshotMode.Catchup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,10 +310,10 @@ public static SnapshotMode StepTime<T>(
|
|||||||
if (drift < -bufferTime / 2)
|
if (drift < -bufferTime / 2)
|
||||||
{
|
{
|
||||||
localTimeline += deltaTime * slowdownMultiplier;
|
localTimeline += deltaTime * slowdownMultiplier;
|
||||||
Debug.LogWarning($"slowdown: time={localTimeline:F3} target={targetTime:F3} bufferTime={bufferTime:F3} drift={drift:F3}");
|
Debug.LogWarning($"slowdown: time={localTimeline:F3} target={targetTime:F3} bufferTime={bufferTime:F3} snaps={buffer.Count} drift={drift:F3}");
|
||||||
return SnapshotMode.Slowdown;
|
return SnapshotMode.Slowdown;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// otherwise we are within normal range.
|
// otherwise we are within normal range.
|
||||||
// move linearly.
|
// move linearly.
|
||||||
localTimeline += deltaTime;
|
localTimeline += deltaTime;
|
||||||
|
Loading…
Reference in New Issue
Block a user