mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:18:22 +08:00
Make sure that 0 SR is returned when there are no hitobjects
This commit is contained in:
parent
bf11a61d52
commit
48989df6eb
@ -39,6 +39,9 @@ namespace osu.Game.Rulesets.Mania.Difficulty
|
||||
|
||||
protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, double timeRate)
|
||||
{
|
||||
if (!beatmap.HitObjects.Any())
|
||||
return new ManiaDifficultyAttributes(mods, 0);
|
||||
|
||||
var difficultyHitObjects = new List<ManiaHitObjectDifficulty>();
|
||||
|
||||
int columnCount = ((ManiaBeatmap)beatmap).TotalColumns;
|
||||
|
@ -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 =
|
||||
{
|
||||
|
@ -35,6 +35,9 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
|
||||
|
||||
protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, double timeRate)
|
||||
{
|
||||
if (!beatmap.HitObjects.Any())
|
||||
return new TaikoDifficultyAttributes(mods, 0);
|
||||
|
||||
var difficultyHitObjects = new List<TaikoHitObjectDifficulty>();
|
||||
|
||||
foreach (var hitObject in beatmap.HitObjects)
|
||||
|
Loading…
Reference in New Issue
Block a user