1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:18:22 +08:00

Use variable

This commit is contained in:
Dean Herbert 2019-04-01 10:37:02 +09:00
parent 73de146fb4
commit d1a175675d

View File

@ -95,12 +95,12 @@ namespace osu.Game.Rulesets.Replays
if (!HasFrames || !FrameAccuratePlayback)
return false;
var checkFrame = currentDirection > 0 ? CurrentFrame : NextFrame;
var frame = currentDirection > 0 ? CurrentFrame : NextFrame;
if (checkFrame == null)
if (frame == null)
return false;
return IsImportant(currentDirection > 0 ? CurrentFrame : NextFrame) && //a button is in a pressed state
return IsImportant(frame) && //a button is in a pressed state
Math.Abs(CurrentTime - NextFrame?.Time ?? 0) <= AllowedImportantTimeSpan; //the next frame is within an allowable time span
}
}