From ae032622aca39420886cb8d3c9becadd9958d212 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Thu, 5 Mar 2026 00:31:43 +0900 Subject: [PATCH] Unimplement legacy compatibility method (#36812) The spectator server invokes both legacy and non-legacy methods to keep compatibility with older clients: https://github.com/ppy/osu-server-spectator/blob/fe0dad324587c8a12a2f203fd8289ce64182c2d9/osu.Server.Spectator/Hubs/Multiplayer/Matchmaking/Queue/MatchmakingQueueBackgroundService.cs#L292-L299 I thought that it'd be a good idea to implement the legacy method here, but it turns out to not be such a good idea because it means ranked-play clients will assume they're receiving a quick play invitation. --- osu.Game/Online/Matchmaking/IMatchmakingClient.cs | 2 ++ osu.Game/Online/Multiplayer/MultiplayerClient.cs | 4 ++-- osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Online/Matchmaking/IMatchmakingClient.cs b/osu.Game/Online/Matchmaking/IMatchmakingClient.cs index e44eafb390..f4263e21be 100644 --- a/osu.Game/Online/Matchmaking/IMatchmakingClient.cs +++ b/osu.Game/Online/Matchmaking/IMatchmakingClient.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System; using System.Threading.Tasks; namespace osu.Game.Online.Matchmaking @@ -26,6 +27,7 @@ namespace osu.Game.Online.Matchmaking /// /// Provided for compatibility with older clients - can be removed 20260825. /// + [Obsolete] Task MatchmakingRoomInvited(); /// diff --git a/osu.Game/Online/Multiplayer/MultiplayerClient.cs b/osu.Game/Online/Multiplayer/MultiplayerClient.cs index b9b4419cbb..04d7d287d1 100644 --- a/osu.Game/Online/Multiplayer/MultiplayerClient.cs +++ b/osu.Game/Online/Multiplayer/MultiplayerClient.cs @@ -1085,8 +1085,8 @@ namespace osu.Game.Online.Multiplayer Task IMatchmakingClient.MatchmakingRoomInvited() { - // Compatibility with older servers. - return ((IMatchmakingClient)this).MatchmakingRoomInvitedWithParams(new MatchmakingRoomInvitationParams { Type = MatchmakingPoolType.QuickPlay }); + // Not implemented (used by older clients). + return Task.CompletedTask; } Task IMatchmakingClient.MatchmakingRoomInvitedWithParams(MatchmakingRoomInvitationParams invitation) diff --git a/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs b/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs index b23a0b3db2..53e3edbe6b 100644 --- a/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs +++ b/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs @@ -75,7 +75,6 @@ namespace osu.Game.Online.Multiplayer connection.On(nameof(IMatchmakingClient.MatchmakingQueueJoined), ((IMatchmakingClient)this).MatchmakingQueueJoined); connection.On(nameof(IMatchmakingClient.MatchmakingQueueLeft), ((IMatchmakingClient)this).MatchmakingQueueLeft); - connection.On(nameof(IMatchmakingClient.MatchmakingRoomInvited), ((IMatchmakingClient)this).MatchmakingRoomInvited); connection.On(nameof(IMatchmakingClient.MatchmakingRoomInvitedWithParams), ((IMatchmakingClient)this).MatchmakingRoomInvitedWithParams); connection.On(nameof(IMatchmakingClient.MatchmakingRoomReady), ((IMatchmakingClient)this).MatchmakingRoomReady); connection.On(nameof(IMatchmakingClient.MatchmakingLobbyStatusChanged), ((IMatchmakingClient)this).MatchmakingLobbyStatusChanged);