Merge branch 'master' into fix-duplicate-bg-sprites

This commit is contained in:
Dan Balasescu 2019-03-07 16:11:33 +09:00 committed by GitHub
commit ae4ca2cb66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View File

@ -124,6 +124,7 @@ namespace osu.Game.Online.Multiplayer
if (other.Host.Value != null && Host.Value?.Id != other.Host.Value.Id)
Host.Value = other.Host.Value;
ChannelId.Value = other.ChannelId.Value;
Status.Value = other.Status.Value;
Availability.Value = other.Availability.Value;
Type.Value = other.Type.Value;

View File

@ -28,13 +28,15 @@ namespace osu.Game.Screens.Multi.Match.Components
{
base.LoadComplete();
roomId.BindValueChanged(_ => updateChannel(), true);
channelId.BindValueChanged(_ => updateChannel(), true);
}
private void updateChannel()
{
if (roomId.Value != null)
Channel.Value = channelManager?.JoinChannel(new Channel { Id = channelId.Value, Type = ChannelType.Multiplayer, Name = $"#mp_{roomId.Value}" });
if (roomId.Value == null || channelId.Value == 0)
return;
Channel.Value = channelManager?.JoinChannel(new Channel { Id = channelId.Value, Type = ChannelType.Multiplayer, Name = $"#lazermp_{roomId.Value}" });
}
}
}

View File

@ -60,9 +60,12 @@ namespace osu.Game.Screens.Select
if (base.OnExiting(next))
return true;
Beatmap.Value = beatmaps.GetWorkingBeatmap(CurrentItem.Value?.Beatmap);
Beatmap.Value.Mods.Value = selectedMods.Value = CurrentItem.Value?.RequiredMods;
Ruleset.Value = CurrentItem.Value?.Ruleset;
if (CurrentItem.Value != null)
{
Ruleset.Value = CurrentItem.Value.Ruleset;
Beatmap.Value = beatmaps.GetWorkingBeatmap(CurrentItem.Value.Beatmap);
Beatmap.Value.Mods.Value = selectedMods.Value = CurrentItem.Value.RequiredMods;
}
Beatmap.Disabled = true;
Ruleset.Disabled = true;