Make sure that 0 SR is returned when there are no hitobjects

This commit is contained in:
smoogipoo
2018-06-21 12:04:14 +09:00
parent bf11a61d52
commit 48989df6eb
3 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty
protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, double timeRate)
{
if (!beatmap.HitObjects.Any())
return new OsuDifficultyAttributes(mods, 0);
OsuDifficultyBeatmap difficultyBeatmap = new OsuDifficultyBeatmap(beatmap.HitObjects.Cast<OsuHitObject>().ToList(), timeRate);
Skill[] skills =
{