1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 12:02:55 +08:00

Fix not applying song select preview seek

This commit is contained in:
MrTheMake 2017-06-18 20:12:28 +02:00
parent 45b0c28461
commit 23d1c89a67

View File

@ -321,21 +321,19 @@ namespace osu.Game.Screens.Select
if (beatmap.Equals(Beatmap?.BeatmapInfo))
return;
bool beatmapSetChange = false;
bool preview = beatmap.BeatmapSetInfoID != Beatmap.BeatmapInfo.BeatmapSetInfoID;
if (beatmap.BeatmapSetInfoID == selectionChangeNoBounce?.BeatmapSetInfoID)
sampleChangeDifficulty.Play();
else
{
sampleChangeBeatmap.Play();
beatmapSetChange = true;
}
selectionChangeNoBounce = beatmap;
selectionChangedDebounce = Scheduler.AddDelayed(delegate
{
Beatmap = database.GetWorkingBeatmap(beatmap, Beatmap);
ensurePlayingSelected(beatmapSetChange);
ensurePlayingSelected(preview);
}, 100);
}
@ -346,6 +344,7 @@ namespace osu.Game.Screens.Select
if (track != null)
{
trackManager.SetExclusive(track);
System.Diagnostics.Debug.WriteLine("Preview: {0}", preview);
if (preview)
track.Seek(Beatmap.Metadata.PreviewTime);
track.Start();