mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 00:09:55 +09:00
Fix intros playing incorrectly
This commit is contained in:
@ -44,8 +44,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
private WorkingBeatmap initialBeatmap;
|
||||
|
||||
[Resolved]
|
||||
protected MusicController MusicController { get; private set; }
|
||||
protected ITrack Track { get; private set; }
|
||||
|
||||
private readonly BindableDouble exitingVolumeFade = new BindableDouble(1);
|
||||
|
||||
@ -62,6 +61,9 @@ namespace osu.Game.Screens.Menu
|
||||
[Resolved]
|
||||
private AudioManager audio { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private MusicController musicController { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the <see cref="Track"/> is provided by osu! resources, rather than a user beatmap.
|
||||
/// </summary>
|
||||
@ -113,9 +115,7 @@ namespace osu.Game.Screens.Menu
|
||||
if (setInfo != null)
|
||||
{
|
||||
initialBeatmap = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]);
|
||||
|
||||
// Todo: Wrong.
|
||||
UsingThemedIntro = MusicController.CurrentTrack?.IsDummyDevice == false;
|
||||
UsingThemedIntro = initialBeatmap.GetRealTrack().IsDummyDevice == false;
|
||||
}
|
||||
|
||||
return UsingThemedIntro;
|
||||
@ -154,7 +154,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
// Only start the current track if it is the menu music. A beatmap's track is started when entering the Main Menu.
|
||||
if (UsingThemedIntro)
|
||||
MusicController.Play(true);
|
||||
Track.Restart();
|
||||
}
|
||||
|
||||
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||
@ -168,6 +168,7 @@ namespace osu.Game.Screens.Menu
|
||||
if (!resuming)
|
||||
{
|
||||
beatmap.Value = initialBeatmap;
|
||||
Track = musicController.CurrentTrack;
|
||||
|
||||
logo.MoveTo(new Vector2(0.5f));
|
||||
logo.ScaleTo(Vector2.One);
|
||||
|
Reference in New Issue
Block a user