mirror of
https://github.com/ppy/osu
synced 2025-03-09 04:48:47 +00:00
Convert slider velocity to scroll speed in taiko beatmap conversion
This commit is contained in:
parent
cc0ca470f1
commit
0a0d699308
@ -57,6 +57,29 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
|
||||
|
||||
Beatmap<TaikoHitObject> converted = base.ConvertBeatmap(original, cancellationToken);
|
||||
|
||||
if (original.BeatmapInfo.Ruleset.OnlineID == 0)
|
||||
{
|
||||
// Post processing step to transform standard slider velocity changes into scroll speed changes
|
||||
double lastScrollSpeed = 1;
|
||||
|
||||
foreach (HitObject hitObject in original.HitObjects)
|
||||
{
|
||||
double nextScrollSpeed = hitObject.DifficultyControlPoint.SliderVelocity;
|
||||
|
||||
if (!Precision.AlmostEquals(lastScrollSpeed, nextScrollSpeed))
|
||||
{
|
||||
EffectControlPoint currentControlPoint = converted.ControlPointInfo.EffectPointAt(hitObject.StartTime);
|
||||
|
||||
if (Precision.AlmostEquals(currentControlPoint.Time, hitObject.StartTime))
|
||||
currentControlPoint.ScrollSpeed = nextScrollSpeed;
|
||||
else
|
||||
converted.ControlPointInfo.Add(hitObject.StartTime, new EffectControlPoint { ScrollSpeed = nextScrollSpeed });
|
||||
|
||||
lastScrollSpeed = nextScrollSpeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (original.BeatmapInfo.Ruleset.OnlineID == 3)
|
||||
{
|
||||
// Post processing step to transform mania hit objects with the same start time into strong hits
|
||||
|
Loading…
Reference in New Issue
Block a user