mirror of
https://github.com/ppy/osu.git
synced 2025-03-05 16:02:56 +08:00
Fix per-hit object slider velocity ignored in osu!catch
This commit is contained in:
parent
dabe295196
commit
3eeedd8024
@ -183,15 +183,15 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
SampleControlPoint lastRelevantSamplePoint = null;
|
SampleControlPoint lastRelevantSamplePoint = null;
|
||||||
DifficultyControlPoint lastRelevantDifficultyPoint = null;
|
DifficultyControlPoint lastRelevantDifficultyPoint = null;
|
||||||
|
|
||||||
bool isOsuRuleset = onlineRulesetID == 0;
|
// In osu!taiko and osu!mania, a scroll speed is stored as "slider velocity" in legacy formats.
|
||||||
|
// In that case, a scrolling speed change is a global effect and per-hit object difficulty control points are ignored.
|
||||||
|
bool scrollSpeedEncodedAsSliderVelocity = onlineRulesetID == 1 || onlineRulesetID == 3;
|
||||||
|
|
||||||
// iterate over hitobjects and pull out all required sample and difficulty changes
|
// iterate over hitobjects and pull out all required sample and difficulty changes
|
||||||
extractDifficultyControlPoints(beatmap.HitObjects);
|
extractDifficultyControlPoints(beatmap.HitObjects);
|
||||||
extractSampleControlPoints(beatmap.HitObjects);
|
extractSampleControlPoints(beatmap.HitObjects);
|
||||||
|
|
||||||
// handle scroll speed, which is stored as "slider velocity" in legacy formats.
|
if (scrollSpeedEncodedAsSliderVelocity)
|
||||||
// this is relevant for scrolling ruleset beatmaps.
|
|
||||||
if (!isOsuRuleset)
|
|
||||||
{
|
{
|
||||||
foreach (var point in legacyControlPoints.EffectPoints)
|
foreach (var point in legacyControlPoints.EffectPoints)
|
||||||
legacyControlPoints.Add(point.Time, new DifficultyControlPoint { SliderVelocity = point.ScrollSpeed });
|
legacyControlPoints.Add(point.Time, new DifficultyControlPoint { SliderVelocity = point.ScrollSpeed });
|
||||||
@ -242,7 +242,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
IEnumerable<DifficultyControlPoint> collectDifficultyControlPoints(IEnumerable<HitObject> hitObjects)
|
IEnumerable<DifficultyControlPoint> collectDifficultyControlPoints(IEnumerable<HitObject> hitObjects)
|
||||||
{
|
{
|
||||||
if (!isOsuRuleset)
|
if (scrollSpeedEncodedAsSliderVelocity)
|
||||||
yield break;
|
yield break;
|
||||||
|
|
||||||
foreach (var hitObject in hitObjects)
|
foreach (var hitObject in hitObjects)
|
||||||
|
Loading…
Reference in New Issue
Block a user