Make added effect points inherit previous effect point settings

This commit is contained in:
sw1tchbl4d3 2022-10-27 23:41:17 +02:00
parent d5c88cca8c
commit 446a9c1b05

View File

@ -65,17 +65,16 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
foreach (HitObject hitObject in original.HitObjects) foreach (HitObject hitObject in original.HitObjects)
{ {
double nextScrollSpeed = hitObject.DifficultyControlPoint.SliderVelocity; double nextScrollSpeed = hitObject.DifficultyControlPoint.SliderVelocity;
EffectControlPoint currentEffectPoint = converted.ControlPointInfo.EffectPointAt(hitObject.StartTime);
if (!Precision.AlmostEquals(lastScrollSpeed, nextScrollSpeed)) if (!Precision.AlmostEquals(lastScrollSpeed, nextScrollSpeed, acceptableDifference: currentEffectPoint.ScrollSpeedBindable.Precision))
{ {
EffectControlPoint currentControlPoint = converted.ControlPointInfo.EffectPointAt(hitObject.StartTime); converted.ControlPointInfo.Add(hitObject.StartTime, new EffectControlPoint
{
if (Precision.AlmostEquals(currentControlPoint.Time, hitObject.StartTime)) KiaiMode = currentEffectPoint.KiaiMode,
currentControlPoint.ScrollSpeed = nextScrollSpeed; OmitFirstBarLine = currentEffectPoint.OmitFirstBarLine,
else ScrollSpeed = lastScrollSpeed = nextScrollSpeed,
converted.ControlPointInfo.Add(hitObject.StartTime, new EffectControlPoint { ScrollSpeed = nextScrollSpeed }); });
lastScrollSpeed = nextScrollSpeed;
} }
} }
} }