mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 21:07:18 +09: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 () =>
|
return joinOrLeaveTaskChain.Add(async () =>
|
||||||
{
|
{
|
||||||
await scheduledReset.ConfigureAwait(false);
|
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)
|
Task IMultiplayerClient.UserKicked(MultiplayerRoomUser user)
|
||||||
{
|
{
|
||||||
|
if (LocalUser == null)
|
||||||
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
if (user.Equals(LocalUser))
|
||||||
|
LeaveRoom();
|
||||||
|
|
||||||
// TODO: also inform users of the kick operation.
|
// TODO: also inform users of the kick operation.
|
||||||
return ((IMultiplayerClient)this).UserLeft(user);
|
return ((IMultiplayerClient)this).UserLeft(user);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user