diff --git a/osu.Game/Online/Multiplayer/MultiplayerClient.cs b/osu.Game/Online/Multiplayer/MultiplayerClient.cs
index 04b87c19da..364309ffe4 100644
--- a/osu.Game/Online/Multiplayer/MultiplayerClient.cs
+++ b/osu.Game/Online/Multiplayer/MultiplayerClient.cs
@@ -265,8 +265,9 @@ namespace osu.Game.Online.Multiplayer
/// The type of the match, if any.
/// The new queue mode, if any.
/// The new auto-start countdown duration, if any.
+ /// The new auto-skip setting.
public Task ChangeSettings(Optional name = default, Optional password = default, Optional matchType = default, Optional queueMode = default,
- Optional autoStartDuration = default)
+ Optional autoStartDuration = default, Optional autoSkip = default)
{
if (Room == null)
throw new InvalidOperationException("Must be joined to a match to change settings.");
@@ -278,6 +279,7 @@ namespace osu.Game.Online.Multiplayer
MatchType = matchType.GetOr(Room.Settings.MatchType),
QueueMode = queueMode.GetOr(Room.Settings.QueueMode),
AutoStartDuration = autoStartDuration.GetOr(Room.Settings.AutoStartDuration),
+ AutoSkip = autoSkip.GetOr(Room.Settings.AutoSkip)
});
}
@@ -739,6 +741,7 @@ namespace osu.Game.Online.Multiplayer
APIRoom.QueueMode.Value = Room.Settings.QueueMode;
APIRoom.AutoStartDuration.Value = Room.Settings.AutoStartDuration;
APIRoom.CurrentPlaylistItem.Value = APIRoom.Playlist.Single(item => item.ID == settings.PlaylistItemId);
+ APIRoom.AutoSkip.Value = Room.Settings.AutoSkip;
RoomUpdated?.Invoke();
}
diff --git a/osu.Game/Online/Multiplayer/MultiplayerRoomSettings.cs b/osu.Game/Online/Multiplayer/MultiplayerRoomSettings.cs
index 356acb427c..c73b02874e 100644
--- a/osu.Game/Online/Multiplayer/MultiplayerRoomSettings.cs
+++ b/osu.Game/Online/Multiplayer/MultiplayerRoomSettings.cs
@@ -29,6 +29,9 @@ namespace osu.Game.Online.Multiplayer
[Key(5)]
public TimeSpan AutoStartDuration { get; set; }
+ [Key(6)]
+ public bool AutoSkip { get; set; }
+
[IgnoreMember]
public bool AutoStartEnabled => AutoStartDuration != TimeSpan.Zero;
@@ -42,7 +45,8 @@ namespace osu.Game.Online.Multiplayer
&& PlaylistItemId == other.PlaylistItemId
&& MatchType == other.MatchType
&& QueueMode == other.QueueMode
- && AutoStartDuration == other.AutoStartDuration;
+ && AutoStartDuration == other.AutoStartDuration
+ && AutoSkip == other.AutoSkip;
}
public override string ToString() => $"Name:{Name}"
@@ -50,6 +54,7 @@ namespace osu.Game.Online.Multiplayer
+ $" Type:{MatchType}"
+ $" Item:{PlaylistItemId}"
+ $" Queue:{QueueMode}"
- + $" Start:{AutoStartDuration}";
+ + $" Start:{AutoStartDuration}"
+ + $" AutoSkip:{AutoSkip}";
}
}
diff --git a/osu.Game/Online/Rooms/Room.cs b/osu.Game/Online/Rooms/Room.cs
index 3a24fa02a8..adfd4c226a 100644
--- a/osu.Game/Online/Rooms/Room.cs
+++ b/osu.Game/Online/Rooms/Room.cs
@@ -159,6 +159,10 @@ namespace osu.Game.Online.Rooms
set => MaxAttempts.Value = value;
}
+ [Cached]
+ [JsonProperty("auto_skip")]
+ public readonly Bindable AutoSkip = new Bindable();
+
public Room()
{
Password.BindValueChanged(p => HasPassword.Value = !string.IsNullOrEmpty(p.NewValue));
@@ -195,6 +199,7 @@ namespace osu.Game.Online.Rooms
DifficultyRange.Value = other.DifficultyRange.Value;
PlaylistItemStats.Value = other.PlaylistItemStats.Value;
CurrentPlaylistItem.Value = other.CurrentPlaylistItem.Value;
+ AutoSkip.Value = other.AutoSkip.Value;
if (EndDate.Value != null && DateTimeOffset.Now >= EndDate.Value)
Status.Value = new RoomStatusEnded();
diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerMatchSettingsOverlay.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerMatchSettingsOverlay.cs
index 3aa879dde0..3d6127e8e7 100644
--- a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerMatchSettingsOverlay.cs
+++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerMatchSettingsOverlay.cs
@@ -63,6 +63,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
public MatchTypePicker TypePicker;
public OsuEnumDropdown QueueModeDropdown;
public OsuTextBox PasswordTextBox;
+ public OsuCheckbox AutoSkipCheckbox;
public TriangleButton ApplyButton;
public OsuSpriteText ErrorText;
@@ -249,6 +250,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
LengthLimit = 255,
},
},
+ new Section("Other")
+ {
+ Child = AutoSkipCheckbox = new OsuCheckbox
+ {
+ LabelText = "Automatically skip the beatmap intro"
+ }
+ }
}
}
},
@@ -343,6 +351,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
Password.BindValueChanged(password => PasswordTextBox.Text = password.NewValue ?? string.Empty, true);
QueueMode.BindValueChanged(mode => QueueModeDropdown.Current.Value = mode.NewValue, true);
AutoStartDuration.BindValueChanged(duration => startModeDropdown.Current.Value = (StartMode)(int)duration.NewValue.TotalSeconds, true);
+ AutoSkip.BindValueChanged(autoSkip => AutoSkipCheckbox.Current.Value = autoSkip.NewValue, true);
operationInProgress.BindTo(ongoingOperationTracker.InProgress);
operationInProgress.BindValueChanged(v =>
@@ -390,7 +399,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
password: PasswordTextBox.Text,
matchType: TypePicker.Current.Value,
queueMode: QueueModeDropdown.Current.Value,
- autoStartDuration: autoStartDuration)
+ autoStartDuration: autoStartDuration,
+ autoSkip: AutoSkipCheckbox.Current.Value)
.ContinueWith(t => Schedule(() =>
{
if (t.IsCompletedSuccessfully)
@@ -406,6 +416,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
room.Password.Value = PasswordTextBox.Current.Value;
room.QueueMode.Value = QueueModeDropdown.Current.Value;
room.AutoStartDuration.Value = autoStartDuration;
+ room.AutoSkip.Value = AutoSkipCheckbox.Current.Value;
if (int.TryParse(MaxParticipantsField.Text, out int max))
room.MaxParticipants.Value = max;
diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPlayer.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPlayer.cs
index a82da7b185..773e68162e 100644
--- a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPlayer.cs
+++ b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPlayer.cs
@@ -61,7 +61,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
{
AllowPause = false,
AllowRestart = false,
- AllowSkipping = false,
+ AllowSkipping = room.AutoSkip.Value,
+ AutomaticallySkipIntro = room.AutoSkip.Value
})
{
this.users = users;
diff --git a/osu.Game/Screens/OnlinePlay/OnlinePlayComposite.cs b/osu.Game/Screens/OnlinePlay/OnlinePlayComposite.cs
index 0bf5f2604c..50ad3228e5 100644
--- a/osu.Game/Screens/OnlinePlay/OnlinePlayComposite.cs
+++ b/osu.Game/Screens/OnlinePlay/OnlinePlayComposite.cs
@@ -86,6 +86,9 @@ namespace osu.Game.Screens.OnlinePlay
[Resolved(typeof(Room))]
protected Bindable AutoStartDuration { get; private set; }
+ [Resolved(typeof(Room))]
+ protected Bindable AutoSkip { get; private set; }
+
[Resolved(CanBeNull = true)]
private IBindable subScreenSelectedItem { get; set; }
diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs
index a9fcab063c..6373633b5a 100644
--- a/osu.Game/Screens/Play/PlayerLoader.cs
+++ b/osu.Game/Screens/Play/PlayerLoader.cs
@@ -363,7 +363,7 @@ namespace osu.Game.Screens.Play
return;
CurrentPlayer = createPlayer();
- CurrentPlayer.Configuration.AutomaticallySkipIntro = quickRestart;
+ CurrentPlayer.Configuration.AutomaticallySkipIntro |= quickRestart;
CurrentPlayer.RestartCount = restartCount++;
CurrentPlayer.RestartRequested = restartRequested;