From 1944a12634817ea43888e8ffec7b6359e6499f44 Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Mon, 12 Feb 2024 21:18:31 +0900 Subject: [PATCH 1/2] allow `ModMuted` to ranked when setting adjusted --- osu.Game/Rulesets/Mods/ModMuted.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Rulesets/Mods/ModMuted.cs b/osu.Game/Rulesets/Mods/ModMuted.cs index 3ecd9aa6a1..7aefefc58d 100644 --- a/osu.Game/Rulesets/Mods/ModMuted.cs +++ b/osu.Game/Rulesets/Mods/ModMuted.cs @@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Mods public override LocalisableString Description => "Can you still feel the rhythm without music?"; public override ModType Type => ModType.Fun; public override double ScoreMultiplier => 1; - public override bool Ranked => UsesDefaultConfiguration; + public override bool Ranked => true; } public abstract class ModMuted : ModMuted, IApplicableToDrawableRuleset, IApplicableToTrack, IApplicableToScoreProcessor From 31dabaefaa95dfb04cebe69a25b3965ae549201d Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Fri, 23 Feb 2024 18:21:11 +0300 Subject: [PATCH 2/2] Reduce smoke allocations --- osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs b/osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs index 9838cb2c37..f4fe42b8de 100644 --- a/osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs +++ b/osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using osu.Framework.Allocation; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; @@ -228,7 +227,9 @@ namespace osu.Game.Rulesets.Osu.Skinning int futurePointIndex = ~Source.SmokePoints.BinarySearch(new SmokePoint { Time = CurrentTime }, new SmokePoint.UpperBoundComparer()); points.Clear(); - points.AddRange(Source.SmokePoints.Skip(firstVisiblePointIndex).Take(futurePointIndex - firstVisiblePointIndex)); + + for (int i = firstVisiblePointIndex; i < futurePointIndex; i++) + points.Add(Source.SmokePoints[i]); } protected sealed override void Draw(IRenderer renderer)