mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 06:52:53 +08:00
Make buttons only respond to MatchStartCountdown
This commit is contained in:
parent
cbb07d4011
commit
ef1955d8ab
@ -77,7 +77,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
|
|
||||||
private void onRoomUpdated() => Scheduler.AddOnce(() =>
|
private void onRoomUpdated() => Scheduler.AddOnce(() =>
|
||||||
{
|
{
|
||||||
bool countdownActive = multiplayerClient.Room?.Countdown != null;
|
bool countdownActive = multiplayerClient.Room?.Countdown is MatchStartCountdown;
|
||||||
|
|
||||||
if (countdownActive)
|
if (countdownActive)
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,21 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
|
|
||||||
private void onRoomUpdated() => Scheduler.AddOnce(() =>
|
private void onRoomUpdated() => Scheduler.AddOnce(() =>
|
||||||
{
|
{
|
||||||
if (countdown != room?.Countdown)
|
MultiplayerCountdown newCountdown;
|
||||||
|
|
||||||
|
switch (room?.Countdown)
|
||||||
|
{
|
||||||
|
case MatchStartCountdown _:
|
||||||
|
newCountdown = room.Countdown;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Clear the countdown with any other (including non-null) countdown values.
|
||||||
|
default:
|
||||||
|
newCountdown = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newCountdown != countdown)
|
||||||
{
|
{
|
||||||
countdown = room?.Countdown;
|
countdown = room?.Countdown;
|
||||||
countdownChangeTime = Time.Current;
|
countdownChangeTime = Time.Current;
|
||||||
|
Loading…
Reference in New Issue
Block a user