mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 16:42:57 +08:00
Fix not applying song select preview seek
This commit is contained in:
parent
45b0c28461
commit
23d1c89a67
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user