mirror of https://github.com/ppy/osu
Change ruleset ID assert in player to null-check
This commit is contained in:
parent
8643c725cc
commit
8db2fc439d
|
@ -2,7 +2,6 @@
|
|||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -218,12 +217,11 @@ private void load(AudioManager audio, OsuConfigManager config, OsuGameBase game)
|
|||
|
||||
Score = CreateScore(playableBeatmap);
|
||||
|
||||
Debug.Assert(ruleset.RulesetInfo.ID != null);
|
||||
|
||||
// ensure the score is in a consistent state with the current player.
|
||||
Score.ScoreInfo.BeatmapInfo = Beatmap.Value.BeatmapInfo;
|
||||
Score.ScoreInfo.Ruleset = ruleset.RulesetInfo;
|
||||
Score.ScoreInfo.RulesetID = ruleset.RulesetInfo.ID.Value;
|
||||
if (ruleset.RulesetInfo.ID != null)
|
||||
Score.ScoreInfo.RulesetID = ruleset.RulesetInfo.ID.Value;
|
||||
Score.ScoreInfo.Mods = gameplayMods;
|
||||
|
||||
dependencies.CacheAs(GameplayState = new GameplayState(playableBeatmap, ruleset, gameplayMods, Score));
|
||||
|
|
Loading…
Reference in New Issue