Reimplement select mod track adjustments

This commit is contained in:
smoogipoo
2019-04-08 19:16:34 +09:00
parent c584967eb1
commit ad124bfeec
5 changed files with 33 additions and 31 deletions

View File

@ -46,14 +46,7 @@ namespace osu.Game.Beatmaps
return b;
});
track = new RecyclableLazy<Track>(() =>
{
// we want to ensure that we always have a track, even if it's a fake one.
var t = GetTrack() ?? new VirtualBeatmapTrack(Beatmap);
// applyRateAdjustments(t);
return t;
});
track = new RecyclableLazy<Track>(() => GetTrack() ?? new VirtualBeatmapTrack(Beatmap));
background = new RecyclableLazy<Texture>(GetBackground, BackgroundStillValid);
waveform = new RecyclableLazy<Waveform>(GetWaveform);
storyboard = new RecyclableLazy<Storyboard>(GetStoryboard);
@ -183,16 +176,6 @@ namespace osu.Game.Beatmaps
/// </summary>
public void RecycleTrack() => track.Recycle();
// private void applyRateAdjustments(Track t = null)
// {
// if (t == null && track.IsResultAvailable) t = Track;
// if (t == null) return;
//
// t.ResetSpeedAdjustments();
// foreach (var mod in Mods.Value.OfType<IApplicableToClock>())
// mod.ApplyToClock(t);
// }
public class RecyclableLazy<T>
{
private Lazy<T> lazy;