mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 15:42:55 +08:00
Add some comments
This commit is contained in:
parent
9f792fec49
commit
a6e77f172d
@ -337,9 +337,12 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
base.UpdateWorkingBeatmap();
|
base.UpdateWorkingBeatmap();
|
||||||
|
|
||||||
|
// Nothing to do if the beatmap hasn't changed.
|
||||||
if (Beatmap.Value.BeatmapInfo.MatchesOnlineID(lastBeatmap.BeatmapInfo))
|
if (Beatmap.Value.BeatmapInfo.MatchesOnlineID(lastBeatmap.BeatmapInfo))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// The selected item is nulled during the beatmap query. During this, the working beatmap will be the dummy beatmap.
|
||||||
|
// We don't want to enter spectate mode with the dummy beatmap.
|
||||||
if (!Beatmap.Value.BeatmapInfo.MatchesOnlineID(SelectedItem.Value?.Beatmap.Value))
|
if (!Beatmap.Value.BeatmapInfo.MatchesOnlineID(SelectedItem.Value?.Beatmap.Value))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -421,9 +424,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
if (expectedSelectedItem == null)
|
if (expectedSelectedItem == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// There's no reason to renew the selected item if its content hasn't changed.
|
||||||
if (SelectedItem.Value?.Equals(expectedSelectedItem) == true && expectedSelectedItem.Beatmap.Value != null)
|
if (SelectedItem.Value?.Equals(expectedSelectedItem) == true && expectedSelectedItem.Beatmap.Value != null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Clear the selected item while the lookup is performed, so components like the ready button can enter their disabled states.
|
||||||
SelectedItem.Value = null;
|
SelectedItem.Value = null;
|
||||||
|
|
||||||
if (expectedSelectedItem.Beatmap.Value == null)
|
if (expectedSelectedItem.Beatmap.Value == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user