1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Fix mania and taiko slider conversion distance

This commit is contained in:
Dan Balasescu 2023-11-28 21:14:56 +09:00
parent 26855a2c04
commit 16577829e2
No known key found for this signature in database
2 changed files with 17 additions and 2 deletions

View File

@ -60,8 +60,15 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
SpanCount = repeatsData?.SpanCount() ?? 1;
StartTime = (int)Math.Round(hitObject.StartTime);
double distance;
if (hitObject is IHasPath pathData)
distance = pathData.Path.ExpectedDistance.Value ?? 0;
else
distance = distanceData.Distance;
// This matches stable's calculation.
EndTime = (int)Math.Floor(StartTime + distanceData.Distance * beatLength * SpanCount * 0.01 / beatmap.Difficulty.SliderMultiplier);
EndTime = (int)Math.Floor(StartTime + distance * beatLength * SpanCount * 0.01 / beatmap.Difficulty.SliderMultiplier);
SegmentDuration = (EndTime - StartTime) / SpanCount;
}

View File

@ -182,7 +182,15 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
// The true distance, accounting for any repeats. This ends up being the drum roll distance later
int spans = (obj as IHasRepeats)?.SpanCount() ?? 1;
double distance = distanceData.Distance * spans * LegacyBeatmapEncoder.LEGACY_TAIKO_VELOCITY_MULTIPLIER;
double distance;
if (obj is IHasPath pathData)
distance = pathData.Path.ExpectedDistance.Value ?? 0;
else
distance = distanceData.Distance;
distance *= spans * LegacyBeatmapEncoder.LEGACY_TAIKO_VELOCITY_MULTIPLIER;
TimingControlPoint timingPoint = beatmap.ControlPointInfo.TimingPointAt(obj.StartTime);