mirror of
https://github.com/ppy/osu
synced 2024-12-17 04:15:37 +00:00
Add client side handling on incoming kick
This commit is contained in:
parent
d9a4f018e6
commit
9b21ebd6d0
@ -190,7 +190,8 @@ namespace osu.Game.Online.Multiplayer
|
||||
return joinOrLeaveTaskChain.Add(async () =>
|
||||
{
|
||||
await scheduledReset.ConfigureAwait(false);
|
||||
await LeaveRoomInternal().ConfigureAwait(false);
|
||||
if (Room != null)
|
||||
await LeaveRoomInternal().ConfigureAwait(false);
|
||||
});
|
||||
}
|
||||
|
||||
@ -391,6 +392,12 @@ namespace osu.Game.Online.Multiplayer
|
||||
|
||||
Task IMultiplayerClient.UserKicked(MultiplayerRoomUser user)
|
||||
{
|
||||
if (LocalUser == null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
if (user.Equals(LocalUser))
|
||||
LeaveRoom();
|
||||
|
||||
// TODO: also inform users of the kick operation.
|
||||
return ((IMultiplayerClient)this).UserLeft(user);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user