1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:07:29 +08:00

Merge branch 'master' into fix-carousel-debounce-race

This commit is contained in:
Dean Herbert 2017-07-21 17:44:04 +09:00 committed by GitHub
commit 9a33e77d63
3 changed files with 3 additions and 5 deletions

View File

@ -94,9 +94,7 @@ namespace osu.Game.Screens.Menu
{
if (!track.IsRunning)
{
track.Seek(metadata.PreviewTime);
if (metadata.PreviewTime == -1)
track.Seek(track.Length * 0.4f);
track.Seek(metadata.PreviewTime != -1 ? metadata.PreviewTime : 0.4f * track.Length);
track.Start();
}
}

View File

@ -25,7 +25,7 @@ namespace osu.Game.Screens.Play
return;
var firstHit = objects.First().StartTime;
var lastHit = (objects.Last() as IHasEndTime)?.EndTime ?? 0;
var lastHit = objects.Max(o => (o as IHasEndTime)?.EndTime ?? o.StartTime);
if (lastHit == 0)
lastHit = objects.Last().StartTime;

View File

@ -190,7 +190,7 @@ namespace osu.Game.Screens.Select
private void carouselBeatmapsLoaded()
{
if (Beatmap.Value != null && Beatmap.Value.BeatmapSetInfo?.DeletePending != false)
if (Beatmap.Value.BeatmapSetInfo?.DeletePending == false)
carousel.SelectBeatmap(Beatmap.Value.BeatmapInfo, false);
else
carousel.SelectNext();