mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Mark the CreateBeatmapProcessor()
as nullable.
Also, should add the null check in the working beatmap.
This commit is contained in:
parent
d39f53f1f0
commit
57c6763556
@ -279,12 +279,15 @@ namespace osu.Game.Beatmaps
|
||||
}
|
||||
}
|
||||
|
||||
IBeatmapProcessor processor = rulesetInstance.CreateBeatmapProcessor(converted);
|
||||
var processor = rulesetInstance.CreateBeatmapProcessor(converted);
|
||||
|
||||
foreach (var mod in mods.OfType<IApplicableToBeatmapProcessor>())
|
||||
mod.ApplyToBeatmapProcessor(processor);
|
||||
if (processor != null)
|
||||
{
|
||||
foreach (var mod in mods.OfType<IApplicableToBeatmapProcessor>())
|
||||
mod.ApplyToBeatmapProcessor(processor);
|
||||
|
||||
processor?.PreProcess();
|
||||
processor.PreProcess();
|
||||
}
|
||||
|
||||
// Compute default values for hitobjects, including creating nested hitobjects in-case they're needed
|
||||
foreach (var obj in converted.HitObjects)
|
||||
|
@ -226,7 +226,7 @@ namespace osu.Game.Rulesets
|
||||
/// </summary>
|
||||
/// <param name="beatmap">The <see cref="IBeatmap"/> to be processed.</param>
|
||||
/// <returns>The <see cref="IBeatmapProcessor"/>.</returns>
|
||||
public virtual IBeatmapProcessor CreateBeatmapProcessor(IBeatmap beatmap) => null;
|
||||
public virtual IBeatmapProcessor? CreateBeatmapProcessor(IBeatmap beatmap) => null;
|
||||
|
||||
public abstract DifficultyCalculator CreateDifficultyCalculator(IWorkingBeatmap beatmap);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user