mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 08:42:55 +08:00
Restore multiplayer to use beatmap track
This commit is contained in:
parent
70697cf1a0
commit
a47b8222b5
@ -52,7 +52,7 @@ namespace osu.Game.Screens.Multi
|
||||
private readonly Bindable<FilterCriteria> currentFilter = new Bindable<FilterCriteria>(new FilterCriteria());
|
||||
|
||||
[Resolved]
|
||||
private MusicController musicController { get; set; }
|
||||
private MusicController music { get; set; }
|
||||
|
||||
[Cached(Type = typeof(IRoomManager))]
|
||||
private RoomManager roomManager;
|
||||
@ -343,10 +343,15 @@ namespace osu.Game.Screens.Multi
|
||||
{
|
||||
if (screenStack.CurrentScreen is MatchSubScreen)
|
||||
{
|
||||
musicController.CurrentTrack.RestartPoint = Beatmap.Value.Metadata.PreviewTime;
|
||||
musicController.CurrentTrack.Looping = true;
|
||||
var track = Beatmap.Value?.Track;
|
||||
|
||||
musicController.EnsurePlayingSomething();
|
||||
if (track != null)
|
||||
{
|
||||
track.RestartPoint = Beatmap.Value.Metadata.PreviewTime;
|
||||
track.Looping = true;
|
||||
|
||||
music.EnsurePlayingSomething();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -356,8 +361,13 @@ namespace osu.Game.Screens.Multi
|
||||
|
||||
private void cancelLooping()
|
||||
{
|
||||
musicController.CurrentTrack.Looping = false;
|
||||
musicController.CurrentTrack.RestartPoint = 0;
|
||||
var track = Beatmap?.Value?.Track;
|
||||
|
||||
if (track != null)
|
||||
{
|
||||
track.Looping = false;
|
||||
track.RestartPoint = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
Loading…
Reference in New Issue
Block a user