mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
Reorganise and reword comments to make time override behaviour a bit clearer
This commit is contained in:
parent
57ba7b7cbb
commit
5eaf3ea576
@ -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--;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user