1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Reorganise and reword comments to make time override behaviour a bit clearer

This commit is contained in:
Dean Herbert 2021-04-15 14:19:06 +09:00
parent 57ba7b7cbb
commit 5eaf3ea576

View File

@ -128,13 +128,13 @@ namespace osu.Game.Rulesets.Replays
double frameStart = getFrameTime(currentFrameIndex); double frameStart = getFrameTime(currentFrameIndex);
double frameEnd = getFrameTime(currentFrameIndex + 1); double frameEnd = getFrameTime(currentFrameIndex + 1);
// If the proposed time is after the current frame end time, we progress forwards. // If the proposed time is after the current frame end time, we progress forwards to precisely the new frame's time (regardless of incoming time).
// If the proposed time is before the current frame start time, and we are at the frame boundary, we progress backwards.
if (frameEnd <= time) if (frameEnd <= time)
{ {
time = frameEnd; time = frameEnd;
currentFrameIndex++; currentFrameIndex++;
} }
// If the proposed time is before the current frame start time, and we are at the frame boundary, we progress backwards.
else if (time < frameStart && CurrentTime == frameStart) else if (time < frameStart && CurrentTime == frameStart)
currentFrameIndex--; currentFrameIndex--;