mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 00:13:19 +08:00
Convert final step to until step to avoid unnecessary delays
This commit is contained in:
parent
7d9bae4507
commit
34d185d846
@ -184,12 +184,14 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddRepeatStep("player joins", playerJoin, 5);
|
||||
|
||||
// all ready
|
||||
AddRepeatStep("players ready up", () =>
|
||||
AddUntilStep("all players ready", () =>
|
||||
{
|
||||
var nextUnready = client.Room?.Users.FirstOrDefault(c => c.State == MultiplayerUserState.Idle);
|
||||
if (nextUnready != null)
|
||||
client.ChangeUserState(nextUnready.UserID, MultiplayerUserState.Ready);
|
||||
}, 40);
|
||||
|
||||
return client.Room?.Users.All(u => u.State == MultiplayerUserState.Ready) == true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user