From 16eda2467fc87a563b06f2e6552569968f878063 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Thu, 18 May 2017 12:50:12 +0900 Subject: [PATCH] Make compile. --- osu.Game.Rulesets.Mania/Beatmaps/LegacyConverter.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Mania/Beatmaps/LegacyConverter.cs b/osu.Game.Rulesets.Mania/Beatmaps/LegacyConverter.cs index 7c8e58862b..18dea8ebc3 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/LegacyConverter.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/LegacyConverter.cs @@ -27,6 +27,8 @@ internal class LegacyConverter private readonly double lastNoteTime; private readonly float lastNotePosition; + private ObjectRow lastRow = new ObjectRow(); + private readonly int availableColumns; private readonly float localXDivisor; @@ -105,7 +107,7 @@ private IEnumerable generateConverted(HitObject original) ObjectConversion conversion = null; if (distanceData != null) - conversion = new DistanceObjectConversion(distanceData, beatmap); + conversion = new DistanceObjectConversion(original, lastRow, random, beatmap); else if (endTimeData != null) { // Spinner @@ -118,8 +120,12 @@ private IEnumerable generateConverted(HitObject original) if (conversion == null) yield break; - foreach (ManiaHitObject obj in conversion.GenerateConversion().HitObjects) + ObjectRow newRow = conversion.GenerateConversion(); + + foreach (ManiaHitObject obj in newRow.HitObjects) yield return obj; + + lastRow = newRow; } private int getColumn(float position) => MathHelper.Clamp((int)Math.Floor(position / localXDivisor), 0, availableColumns - 1);