mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 04:13:00 +08:00
Ensure there's a buffer after the last hitobject to allow certain replay tests to complete correctly
This commit is contained in:
parent
a8cbd400d3
commit
21bf93a7c2
@ -226,16 +226,18 @@ namespace osu.Game.Tests.Visual
|
||||
public ClockBackedTestWorkingBeatmap(IBeatmap beatmap, Storyboard storyboard, IFrameBasedClock referenceClock, AudioManager audio)
|
||||
: base(beatmap, storyboard, audio)
|
||||
{
|
||||
double lastObjectTime = beatmap.HitObjects.LastOrDefault()?.GetEndTime() ?? 60000;
|
||||
var lastHitObject = beatmap.HitObjects.LastOrDefault();
|
||||
|
||||
double trackLength = lastHitObject?.GetEndTime() + 2000 ?? 60000;
|
||||
|
||||
if (referenceClock != null)
|
||||
{
|
||||
store = new TrackVirtualStore(referenceClock);
|
||||
audio.AddItem(store);
|
||||
track = store.GetVirtual(lastObjectTime);
|
||||
track = store.GetVirtual(trackLength);
|
||||
}
|
||||
else
|
||||
track = audio?.Tracks.GetVirtual(lastObjectTime);
|
||||
track = audio?.Tracks.GetVirtual(trackLength);
|
||||
}
|
||||
|
||||
~ClockBackedTestWorkingBeatmap()
|
||||
|
Loading…
Reference in New Issue
Block a user