mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 12:35:34 +08:00
Match new server ready/unready logic
This commit is contained in:
parent
792e79265b
commit
2553cfed75
@ -138,21 +138,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
bool shouldHaveCountdown = !APIRoom.Playlist.GetCurrentItem()!.Expired && Room.Users.Any(u => u.State == MultiplayerUserState.Ready);
|
||||
|
||||
if (shouldHaveCountdown)
|
||||
{
|
||||
if (Room.Countdown == null)
|
||||
startCountdown(new MatchStartCountdown { TimeRemaining = Room.Settings.AutoStartDuration }, StartMatch);
|
||||
}
|
||||
else
|
||||
stopCountdown();
|
||||
}
|
||||
else
|
||||
{
|
||||
bool shouldStopCountdown = Room.Users.All(u => u.State != MultiplayerUserState.Ready);
|
||||
shouldStopCountdown |= Room.Host?.State != MultiplayerUserState.Ready && Room.Host?.State != MultiplayerUserState.Spectating;
|
||||
|
||||
if (shouldStopCountdown)
|
||||
stopCountdown();
|
||||
if (shouldHaveCountdown && Room.Countdown == null)
|
||||
startCountdown(new MatchStartCountdown { TimeRemaining = Room.Settings.AutoStartDuration }, StartMatch);
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user