1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 14:13:18 +08:00

Only update stacking if there are hitobjects

This commit is contained in:
smoogipoo 2019-01-07 18:15:44 +09:00
parent c6c22b352f
commit b57c1af084

View File

@ -24,14 +24,17 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
var osuBeatmap = (Beatmap<OsuHitObject>)Beatmap;
// Reset stacking
foreach (var h in osuBeatmap.HitObjects)
h.StackHeight = 0;
if (osuBeatmap.HitObjects.Count > 0)
{
// Reset stacking
foreach (var h in osuBeatmap.HitObjects)
h.StackHeight = 0;
if (Beatmap.BeatmapInfo.BeatmapVersion >= 6)
applyStacking(osuBeatmap, 0, osuBeatmap.HitObjects.Count - 1);
else
applyStackingOld(osuBeatmap);
if (Beatmap.BeatmapInfo.BeatmapVersion >= 6)
applyStacking(osuBeatmap, 0, osuBeatmap.HitObjects.Count - 1);
else
applyStackingOld(osuBeatmap);
}
}
private void applyStacking(Beatmap<OsuHitObject> beatmap, int startIndex, int endIndex)