Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@peppy
Copy link
Member

@peppy peppy commented Sep 4, 2025

Split out from #34815 to get server-side things deployed.

Should be a clean diff against matchmaking main branch with no surprises.

@peppy peppy requested a review from smoogipoo September 4, 2025 09:33
@peppy peppy added the area:online functionality Deals with online fetching / sending but don't change much on a surface UI level. label Sep 4, 2025
smoogipoo
smoogipoo previously approved these changes Sep 4, 2025
Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems okay

@smoogipoo
Copy link
Contributor

Actually before this goes in (since we're going to need a nuget package), let's add a variant to MatchmakingSettings.

@smoogipoo
Copy link
Contributor

diff --git a/osu.Game/Online/Matchmaking/MatchmakingSettings.cs b/osu.Game/Online/Matchmaking/MatchmakingSettings.cs
index 050133e192..c1a10e97ad 100644
--- a/osu.Game/Online/Matchmaking/MatchmakingSettings.cs
+++ b/osu.Game/Online/Matchmaking/MatchmakingSettings.cs
@@ -14,16 +14,18 @@ public class MatchmakingSettings : IEquatable<MatchmakingSettings>
         [Key(0)]
         public int RulesetId { get; set; }
 
+        [Key(1)]
+        public int Variant { get; set; }
+
         public bool Equals(MatchmakingSettings? other)
-            => other != null && RulesetId == other.RulesetId;
+            => other != null
+               && RulesetId == other.RulesetId
+               && Variant == other.Variant;
 
         public override bool Equals(object? obj)
             => obj is MatchmakingSettings other && Equals(other);
 
         [SuppressMessage("ReSharper", "NonReadonlyMemberInGetHashCode")]
-        public override int GetHashCode()
-        {
-            return RulesetId;
-        }
+        public override int GetHashCode() => HashCode.Combine(RulesetId, Variant);
     }
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:online functionality Deals with online fetching / sending but don't change much on a surface UI level. size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants