mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 12:58:01 +09:00
Remove lots of unnecessary client side logic
This commit is contained in:
parent
1368d55152
commit
9ba5ae3db7
@ -270,7 +270,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
BeatmapAvailability.BindValueChanged(updateBeatmapAvailability, true);
|
BeatmapAvailability.BindValueChanged(updateBeatmapAvailability, true);
|
||||||
UserMods.BindValueChanged(onUserModsChanged);
|
UserMods.BindValueChanged(onUserModsChanged);
|
||||||
|
|
||||||
client.RoomUpdated += onRoomUpdated;
|
|
||||||
client.LoadRequested += onLoadRequested;
|
client.LoadRequested += onLoadRequested;
|
||||||
|
|
||||||
isConnected = client.IsConnected.GetBoundCopy();
|
isConnected = client.IsConnected.GetBoundCopy();
|
||||||
@ -323,24 +322,12 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
client.ChangeUserMods(mods.NewValue);
|
client.ChangeUserMods(mods.NewValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateBeatmapAvailability(ValueChangedEvent<BeatmapAvailability> _ = null)
|
private void updateBeatmapAvailability(ValueChangedEvent<BeatmapAvailability> availability)
|
||||||
{
|
{
|
||||||
if (client.Room == null)
|
if (client.Room == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
client.ChangeBeatmapAvailability(BeatmapAvailability.Value);
|
client.ChangeBeatmapAvailability(availability.NewValue);
|
||||||
|
|
||||||
if (client.LocalUser?.State == MultiplayerUserState.Ready)
|
|
||||||
client.ChangeState(MultiplayerUserState.Idle);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onRoomUpdated()
|
|
||||||
{
|
|
||||||
if (client.Room == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (client.LocalUser?.BeatmapAvailability.Equals(BeatmapAvailability.Value) == false)
|
|
||||||
updateBeatmapAvailability();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onReadyClick()
|
private void onReadyClick()
|
||||||
@ -392,10 +379,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
|
|
||||||
if (client != null)
|
if (client != null)
|
||||||
{
|
|
||||||
client.LoadRequested -= onLoadRequested;
|
client.LoadRequested -= onLoadRequested;
|
||||||
client.RoomUpdated -= onRoomUpdated;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class UserModSelectOverlay : ModSelectOverlay
|
private class UserModSelectOverlay : ModSelectOverlay
|
||||||
|
Loading…
x
Reference in New Issue
Block a user