mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add AbortLoad() method to abort gameplay loads
This commit is contained in:
@ -242,6 +242,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
public override Task ChangeState(MultiplayerUserState newState)
|
||||
{
|
||||
Debug.Assert(Room != null);
|
||||
|
||||
if (newState == MultiplayerUserState.Idle && LocalUser?.State == MultiplayerUserState.WaitingForLoad)
|
||||
return Task.CompletedTask;
|
||||
|
||||
ChangeUserState(api.LocalUser.Value.Id, newState);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@ -303,6 +308,16 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
return ((IMultiplayerClient)this).LoadRequested();
|
||||
}
|
||||
|
||||
public override Task AbortLoad()
|
||||
{
|
||||
Debug.Assert(Room != null);
|
||||
Debug.Assert(LocalUser != null);
|
||||
|
||||
ChangeUserState(LocalUser.UserID, MultiplayerUserState.Idle);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public async Task AddUserPlaylistItem(int userId, MultiplayerPlaylistItem item)
|
||||
{
|
||||
Debug.Assert(Room != null);
|
||||
|
Reference in New Issue
Block a user