Skip to content

Commit d2d87d2

Browse files
fix: CI errors (CS8619/IDE1006) + merge ppy ppy#37795 (no invite/duel in ranked rooms)
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/27570109-9bbd-46a9-bb06-b8e5b4034215 Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent 3ed53ba commit d2d87d2

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

osu.Game.Rulesets.Osu/Difficulty/Evaluators/RhythmEvaluator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current)
138138
double power = DifficultyCalculationUtils.Logistic(island.Delta, maxValue: 2.75, multiplier: 0.24, midpointOffset: 58.33);
139139
effectiveRatio *= Math.Min(3.0 / islandCount.Count, Math.Pow(1.0 / islandCount.Count, power));
140140

141-
islandCounts[islandCountIndex] = (islandCount.Island, islandCount.Count);
141+
islandCounts[islandCountIndex] = (islandCount.Island!, islandCount.Count);
142142
}
143143
else
144144
{

osu.Game.Rulesets.Osu/Replays/OsuAutoGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ private void addHitObjectClickFrames(OsuHitObject h, Vector2 startPosition, floa
329329
var frame = (OsuReplayFrame)Frames[j];
330330

331331
// Don't affect frames which stop pressing a button!
332-
if (j < Frames.Count - 1 || ActionsEqual(frame.Actions, previousActions))
332+
if (j < Frames.Count - 1 || actionsEqual(frame.Actions, previousActions))
333333
{
334334
frame.Actions.Clear();
335335
frame.Actions.Add(action);
@@ -394,7 +394,7 @@ private void addHitObjectClickFrames(OsuHitObject h, Vector2 startPosition, floa
394394
AddFrameToReplay(endFrame);
395395
}
396396

397-
private static bool ActionsEqual(List<OsuAction> a, List<OsuAction> b)
397+
private static bool actionsEqual(List<OsuAction> a, List<OsuAction> b)
398398
{
399399
if (a.Count != b.Count) return false;
400400
for (int i = 0; i < a.Count; i++)

osu.Game/Screens/OnlinePlay/Matchmaking/Queue/QueueController.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ public void LeaveQueue()
8989

9090
public void IssueDuel(MatchmakingPool pool, int userId)
9191
{
92+
if (client.Room?.Settings.MatchType.IsMatchmakingType() == true)
93+
return;
94+
9295
lastDuelUser = userId;
9396
lastDuelPool = pool;
9497

osu.Game/Users/UserPanel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
using osu.Game.Online.Chat;
2424
using osu.Game.Online.Metadata;
2525
using osu.Game.Online.Multiplayer;
26+
using osu.Game.Online.Rooms;
2627
using osu.Game.Overlays;
2728
using osu.Game.Resources.Localisation.Web;
2829
using osu.Game.Screens;
@@ -210,9 +211,9 @@ public MenuItem[] ContextMenuItems
210211
return items.ToArray();
211212

212213
bool isUserOnline() => metadataClient?.GetPresence(User.OnlineID) != null;
213-
bool canInviteUser() => isUserOnline() && multiplayerClient?.Room?.Users.All(u => u.UserID != User.Id) == true;
214+
bool canInviteUser() => isUserOnline() && multiplayerClient?.Room?.Users.All(u => u.UserID != User.Id) == true && multiplayerClient?.Room?.Settings.MatchType.IsMatchmakingType() != true;
214215
bool isUserBlocked() => api.LocalUserState.Blocks.Any(b => b.TargetID == User.OnlineID);
215-
bool canDuelUser() => isUserOnline() && queueController?.SelectedPool.Value != null;
216+
bool canDuelUser() => isUserOnline() && queueController?.SelectedPool.Value != null && multiplayerClient?.Room?.Settings.MatchType.IsMatchmakingType() != true;
216217
}
217218
}
218219

0 commit comments

Comments
 (0)