1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Consider mod equality in difficulty cache lookup rather than acronym

This commit is contained in:
Salman Ahmed 2021-08-17 04:27:43 +03:00
parent 060ba0692d
commit 0291cd5ae2

View File

@ -297,7 +297,7 @@ namespace osu.Game.Beatmaps
public bool Equals(DifficultyCacheLookup other)
=> Beatmap.ID == other.Beatmap.ID
&& Ruleset.ID == other.Ruleset.ID
&& OrderedMods.Select(m => m.Acronym).SequenceEqual(other.OrderedMods.Select(m => m.Acronym));
&& OrderedMods.SequenceEqual(other.OrderedMods);
public override int GetHashCode()
{
@ -307,7 +307,7 @@ namespace osu.Game.Beatmaps
hashCode.Add(Ruleset.ID);
foreach (var mod in OrderedMods)
hashCode.Add(mod.Acronym);
hashCode.Add(mod);
return hashCode.ToHashCode();
}