1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 05:22:54 +08:00

Added safety measures for invalid mod combinations

This commit is contained in:
Terochi 2023-04-25 21:28:03 +02:00
parent 0841e73a39
commit 8e297dc60a

View File

@ -641,6 +641,16 @@ namespace osu.Game
convertedCommonMods.Add(convertedMod);
}
if (!ModUtils.CheckValidForGameplay(convertedCommonMods, out var invalid))
{
invalid.ForEach(mod =>
{
int index = convertedCommonMods.IndexOf(mod);
convertedCommonMods.RemoveAt(index);
previouslySelectedCommonMods.RemoveAt(index);
});
}
if (!SelectedMods.Disabled)
// Select common mods to play the deselect samples for other mods
SelectedMods.Value = previouslySelectedCommonMods;