mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 15:17:27 +08:00
Add guard against starting gameplay with invalid mod instances
Move guard to `Player` instead
This commit is contained in:
parent
b1fae2bc6a
commit
0c02062780
@ -213,6 +213,12 @@ namespace osu.Game.Screens.Play
|
||||
if (playableBeatmap == null)
|
||||
return;
|
||||
|
||||
if (gameplayMods.Any(m => ruleset.AllMods.All(rulesetMod => m.GetType() != rulesetMod.GetType())))
|
||||
{
|
||||
Logger.Log($@"Gameplay was started with a mod belonging to a ruleset different than '{ruleset.Description}'.", level: LogLevel.Important);
|
||||
return;
|
||||
}
|
||||
|
||||
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
||||
|
||||
if (game != null)
|
||||
|
Loading…
Reference in New Issue
Block a user