1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Make autoplay unpress sooner, if needed

This commit is contained in:
Desconocidosmh 2019-08-14 19:49:32 +02:00
parent 3c5a829ddd
commit f849b4ce54

View File

@ -113,14 +113,21 @@ namespace osu.Game.Rulesets.Taiko.Replays
else
throw new InvalidOperationException("Unknown hit object type.");
Frames.Add(new TaikoReplayFrame(endTime + KEY_UP_DELAY));
if (i < Beatmap.HitObjects.Count - 1)
{
double waitTime = Beatmap.HitObjects[i + 1].StartTime - 1000;
var nextHitObject = Beatmap.HitObjects[i + 1];
if (!(nextHitObject.StartTime < endTime + KEY_UP_DELAY))
Frames.Add(new TaikoReplayFrame(endTime + KEY_UP_DELAY));
double waitTime = nextHitObject.StartTime - 1000;
if (waitTime > endTime)
Frames.Add(new TaikoReplayFrame(waitTime));
}
else
{
Frames.Add(new TaikoReplayFrame(endTime + KEY_UP_DELAY));
}
hitButton = !hitButton;
}