diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModMirror.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModMirror.cs index 6032d331a..a3e697a11 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModMirror.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModMirror.cs @@ -56,8 +56,10 @@ public void ApplyToBeatmap(IBeatmap beatmap) { foreach (var slideInfo in slide.SlideInfoList) { - foreach (var part in slideInfo.SlidePathParts) + + for (int i = 0; i < slideInfo.SlidePathParts.Length; ++i) { + var part = slideInfo.SlidePathParts[i]; part.EndOffset = (part.EndOffset * -1).NormalizePath(); part.Mirrored ^= mirrored; } diff --git a/osu.Game.Rulesets.Sentakki/Objects/SlidePathPart.cs b/osu.Game.Rulesets.Sentakki/Objects/SlidePathPart.cs index fb805db6b..9b88855f1 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/SlidePathPart.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/SlidePathPart.cs @@ -1,8 +1,6 @@ -using System; - namespace osu.Game.Rulesets.Sentakki.Objects { - public class SlideBodyPart : IEquatable + public record struct SlideBodyPart { public SlidePaths.PathShapes Shape { get; private set; } public int EndOffset { get; set; } @@ -14,11 +12,5 @@ public SlideBodyPart(SlidePaths.PathShapes shape, int endOffset, bool mirrored) EndOffset = endOffset; Mirrored = mirrored; } - - public override bool Equals(object? obj) => obj is not null && obj is SlideBodyPart otherPart && Equals(otherPart); - - public bool Equals(SlideBodyPart? other) => other is not null && (ReferenceEquals(this, other) || (Shape == other.Shape && EndOffset == other.EndOffset)); - - public override int GetHashCode() => HashCode.Combine(Shape, EndOffset, Mirrored); } }