mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 20:23:00 +08:00
Fix CurrentMatchPlayingItem
not being reset on leaving a multiplayer room
This commit is contained in:
parent
6da977f99a
commit
2b9168157d
@ -24,6 +24,8 @@ namespace osu.Game.Tests.NonVisual.Multiplayer
|
|||||||
AddRepeatStep("add some users", () => Client.AddUser(new User { Id = id++ }), 5);
|
AddRepeatStep("add some users", () => Client.AddUser(new User { Id = id++ }), 5);
|
||||||
checkPlayingUserCount(0);
|
checkPlayingUserCount(0);
|
||||||
|
|
||||||
|
AddAssert("playlist item is available", () => Client.CurrentMatchPlayingItem.Value != null);
|
||||||
|
|
||||||
changeState(3, MultiplayerUserState.WaitingForLoad);
|
changeState(3, MultiplayerUserState.WaitingForLoad);
|
||||||
checkPlayingUserCount(3);
|
checkPlayingUserCount(3);
|
||||||
|
|
||||||
@ -41,6 +43,8 @@ namespace osu.Game.Tests.NonVisual.Multiplayer
|
|||||||
|
|
||||||
AddStep("leave room", () => Client.LeaveRoom());
|
AddStep("leave room", () => Client.LeaveRoom());
|
||||||
checkPlayingUserCount(0);
|
checkPlayingUserCount(0);
|
||||||
|
|
||||||
|
AddAssert("playlist item is null", () => Client.CurrentMatchPlayingItem.Value == null);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -181,6 +181,7 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
{
|
{
|
||||||
APIRoom = null;
|
APIRoom = null;
|
||||||
Room = null;
|
Room = null;
|
||||||
|
CurrentMatchPlayingItem.Value = null;
|
||||||
PlayingUserIds.Clear();
|
PlayingUserIds.Clear();
|
||||||
|
|
||||||
RoomUpdated?.Invoke();
|
RoomUpdated?.Invoke();
|
||||||
|
Loading…
Reference in New Issue
Block a user