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:
parent
0841e73a39
commit
8e297dc60a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user