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:
parent
26855a2c04
commit
16577829e2
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user