1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:22:55 +08:00

Only change track when audio doesn't equal

This commit is contained in:
smoogipoo 2020-08-05 21:30:11 +09:00
parent f058f5e977
commit 0edd509397

View File

@ -320,6 +320,18 @@ namespace osu.Game.Overlays
current = beatmap.NewValue;
if (!beatmap.OldValue.BeatmapInfo.AudioEquals(current?.BeatmapInfo))
changeTrack();
TrackChanged?.Invoke(current, direction);
ResetTrackAdjustments();
queuedDirection = null;
}
private void changeTrack()
{
CurrentTrack?.Expire();
CurrentTrack = null;
@ -328,12 +340,6 @@ namespace osu.Game.Overlays
trackContainer.Add(CurrentTrack = new DrawableTrack(current.GetRealTrack()));
CurrentTrack.Completed += () => onTrackCompleted(current);
}
TrackChanged?.Invoke(current, direction);
ResetTrackAdjustments();
queuedDirection = null;
}
private void onTrackCompleted(WorkingBeatmap workingBeatmap)