mirror of
https://github.com/ppy/osu
synced 2025-01-20 04:50:50 +00:00
Only instantiate ruleset once
This commit is contained in:
parent
1e2b425f3f
commit
8b1f5ff492
@ -354,14 +354,14 @@ namespace osu.Game.Online.RealtimeMultiplayer
|
||||
var beatmap = beatmapSet.Beatmaps.Single(b => b.OnlineBeatmapID == settings.BeatmapID);
|
||||
beatmap.MD5Hash = settings.BeatmapChecksum;
|
||||
|
||||
var ruleset = rulesets.GetRuleset(settings.RulesetID);
|
||||
var mods = settings.Mods.Select(m => m.ToMod(ruleset.CreateInstance()));
|
||||
var ruleset = rulesets.GetRuleset(settings.RulesetID).CreateInstance();
|
||||
var mods = settings.Mods.Select(m => m.ToMod(ruleset));
|
||||
|
||||
PlaylistItem playlistItem = new PlaylistItem
|
||||
{
|
||||
ID = playlistItemId,
|
||||
Beatmap = { Value = beatmap },
|
||||
Ruleset = { Value = ruleset },
|
||||
Ruleset = { Value = ruleset.RulesetInfo },
|
||||
};
|
||||
|
||||
playlistItem.RequiredMods.AddRange(mods);
|
||||
|
Loading…
Reference in New Issue
Block a user