1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 06:32:55 +08:00

Rename SliderMultiplier to BaseSliderVelocity

This commit is contained in:
Dean Herbert 2023-05-07 12:32:38 +09:00
parent 214bc40570
commit f7d44c3013
30 changed files with 49 additions and 48 deletions

View File

@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
{ {
var playable = base.GetPlayableBeatmap(); var playable = base.GetPlayableBeatmap();
playable.Difficulty.SliderTickRate = 5; playable.Difficulty.SliderTickRate = 5;
playable.Difficulty.SliderMultiplier = velocity_factor * 10; playable.Difficulty.BaseSliderVelocity = velocity_factor * 10;
return playable; return playable;
} }

View File

@ -210,7 +210,7 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
X = x, X = x,
Path = sliderPath, Path = sliderPath,
}; };
EditorBeatmap.Difficulty.SliderMultiplier = velocity; EditorBeatmap.Difficulty.BaseSliderVelocity = velocity;
EditorBeatmap.Add(hitObject); EditorBeatmap.Add(hitObject);
EditorBeatmap.Update(hitObject); EditorBeatmap.Update(hitObject);
Assert.That(hitObject.Velocity, Is.EqualTo(velocity)); Assert.That(hitObject.Velocity, Is.EqualTo(velocity));

View File

@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Catch.Tests
{ {
BeatmapInfo = new BeatmapInfo BeatmapInfo = new BeatmapInfo
{ {
Difficulty = new BeatmapDifficulty { CircleSize = 6, SliderMultiplier = 3 }, Difficulty = new BeatmapDifficulty { CircleSize = 6, BaseSliderVelocity = 3 },
Ruleset = ruleset Ruleset = ruleset
} }
}; };

View File

@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Catch.Tests
{ {
BeatmapInfo = new BeatmapInfo BeatmapInfo = new BeatmapInfo
{ {
Difficulty = new BeatmapDifficulty { CircleSize = 5, SliderMultiplier = 2 }, Difficulty = new BeatmapDifficulty { CircleSize = 5, BaseSliderVelocity = 2 },
Ruleset = ruleset Ruleset = ruleset
}, },
HitObjects = new List<HitObject> HitObjects = new List<HitObject>

View File

@ -64,8 +64,8 @@ namespace osu.Game.Rulesets.Catch.Objects
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime); TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
velocityFactor = base_scoring_distance * difficulty.SliderMultiplier / timingPoint.BeatLength; velocityFactor = base_scoring_distance * difficulty.BaseSliderVelocity / timingPoint.BeatLength;
tickDistanceFactor = base_scoring_distance * difficulty.SliderMultiplier / difficulty.SliderTickRate; tickDistanceFactor = base_scoring_distance * difficulty.BaseSliderVelocity / difficulty.SliderTickRate;
} }
protected override void CreateNestedHitObjects(CancellationToken cancellationToken) protected override void CreateNestedHitObjects(CancellationToken cancellationToken)

View File

@ -61,7 +61,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
StartTime = (int)Math.Round(hitObject.StartTime); StartTime = (int)Math.Round(hitObject.StartTime);
// This matches stable's calculation. // This matches stable's calculation.
EndTime = (int)Math.Floor(StartTime + distanceData.Distance * beatLength * SpanCount * 0.01 / beatmap.Difficulty.SliderMultiplier); EndTime = (int)Math.Floor(StartTime + distanceData.Distance * beatLength * SpanCount * 0.01 / beatmap.Difficulty.BaseSliderVelocity);
SegmentDuration = (EndTime - StartTime) / SpanCount; SegmentDuration = (EndTime - StartTime) / SpanCount;
} }

View File

@ -92,7 +92,7 @@ namespace osu.Game.Rulesets.Mania.UI
{ {
// Mania doesn't care about global velocity // Mania doesn't care about global velocity
p.Velocity = 1; p.Velocity = 1;
p.BaseBeatLength *= Beatmap.Difficulty.SliderMultiplier; p.BaseBeatLength *= Beatmap.Difficulty.BaseSliderVelocity;
// For non-mania beatmap, speed changes should only happen through timing points // For non-mania beatmap, speed changes should only happen through timing points
if (!isForCurrentRuleset) if (!isForCurrentRuleset)

View File

@ -80,7 +80,7 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
[SetUp] [SetUp]
public void Setup() => Schedule(() => public void Setup() => Schedule(() =>
{ {
editorBeatmap.Difficulty.SliderMultiplier = 1; editorBeatmap.Difficulty.BaseSliderVelocity = 1;
editorBeatmap.ControlPointInfo.Clear(); editorBeatmap.ControlPointInfo.Clear();
editorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = beat_length }); editorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = beat_length });
snapProvider.DistanceSpacingMultiplier.Value = 1; snapProvider.DistanceSpacingMultiplier.Value = 1;

View File

@ -162,7 +162,7 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
AddStep("change to these specific circumstances", () => AddStep("change to these specific circumstances", () =>
{ {
EditorBeatmap.Difficulty.SliderMultiplier = 1; EditorBeatmap.Difficulty.BaseSliderVelocity = 1;
var timingPoint = EditorBeatmap.ControlPointInfo.TimingPointAt(slider.StartTime); var timingPoint = EditorBeatmap.ControlPointInfo.TimingPointAt(slider.StartTime);
timingPoint.BeatLength = 352.941176470588; timingPoint.BeatLength = 352.941176470588;
slider.Path.ControlPoints[^1].Position = new Vector2(-110, 16); slider.Path.ControlPoints[^1].Position = new Vector2(-110, 16);

View File

@ -167,7 +167,7 @@ namespace osu.Game.Rulesets.Osu.Objects
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime); TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
double scoringDistance = BASE_SCORING_DISTANCE * difficulty.SliderMultiplier * SliderVelocity; double scoringDistance = BASE_SCORING_DISTANCE * difficulty.BaseSliderVelocity * SliderVelocity;
Velocity = scoringDistance / timingPoint.BeatLength; Velocity = scoringDistance / timingPoint.BeatLength;
TickDistance = GenerateTicks ? (scoringDistance / difficulty.SliderTickRate * TickDistanceMultiplier) : double.PositiveInfinity; TickDistance = GenerateTicks ? (scoringDistance / difficulty.SliderTickRate * TickDistanceMultiplier) : double.PositiveInfinity;

View File

@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Editor
[Test] [Test]
public void TestTaikoSliderMultiplier() public void TestTaikoSliderMultiplier()
{ {
AddStep("Set slider multiplier", () => EditorBeatmap.Difficulty.SliderMultiplier = 2); AddStep("Set slider multiplier", () => EditorBeatmap.Difficulty.BaseSliderVelocity = 2);
SaveEditor(); SaveEditor();
@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Editor
// therefore, ensure that we have that difficulty type by calling .CopyFrom(), which is a no-op if the type is already correct. // therefore, ensure that we have that difficulty type by calling .CopyFrom(), which is a no-op if the type is already correct.
var taikoDifficulty = new TaikoBeatmapConverter.TaikoMultiplierAppliedDifficulty(); var taikoDifficulty = new TaikoBeatmapConverter.TaikoMultiplierAppliedDifficulty();
taikoDifficulty.CopyFrom(EditorBeatmap.Difficulty); taikoDifficulty.CopyFrom(EditorBeatmap.Difficulty);
return Precision.AlmostEquals(taikoDifficulty.SliderMultiplier, 2); return Precision.AlmostEquals(taikoDifficulty.BaseSliderVelocity, 2);
} }
} }
} }

View File

@ -189,7 +189,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
else else
beatLength = timingPoint.BeatLength; beatLength = timingPoint.BeatLength;
double sliderScoringPointDistance = osu_base_scoring_distance * beatmap.Difficulty.SliderMultiplier / beatmap.Difficulty.SliderTickRate; double sliderScoringPointDistance = osu_base_scoring_distance * beatmap.Difficulty.BaseSliderVelocity / beatmap.Difficulty.SliderTickRate;
// The velocity and duration of the taiko hit object - calculated as the velocity of a drum roll. // The velocity and duration of the taiko hit object - calculated as the velocity of a drum roll.
double taikoVelocity = sliderScoringPointDistance * beatmap.Difficulty.SliderTickRate; double taikoVelocity = sliderScoringPointDistance * beatmap.Difficulty.SliderTickRate;
@ -239,14 +239,14 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
{ {
base.CopyTo(other); base.CopyTo(other);
if (!(other is TaikoMultiplierAppliedDifficulty)) if (!(other is TaikoMultiplierAppliedDifficulty))
other.SliderMultiplier /= LegacyBeatmapEncoder.LEGACY_TAIKO_VELOCITY_MULTIPLIER; other.BaseSliderVelocity /= LegacyBeatmapEncoder.LEGACY_TAIKO_VELOCITY_MULTIPLIER;
} }
public override void CopyFrom(IBeatmapDifficultyInfo other) public override void CopyFrom(IBeatmapDifficultyInfo other)
{ {
base.CopyFrom(other); base.CopyFrom(other);
if (!(other is TaikoMultiplierAppliedDifficulty)) if (!(other is TaikoMultiplierAppliedDifficulty))
SliderMultiplier *= LegacyBeatmapEncoder.LEGACY_TAIKO_VELOCITY_MULTIPLIER; BaseSliderVelocity *= LegacyBeatmapEncoder.LEGACY_TAIKO_VELOCITY_MULTIPLIER;
} }
#endregion #endregion

View File

@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Taiko.Mods
{ {
base.ApplySettings(difficulty); base.ApplySettings(difficulty);
if (ScrollSpeed.Value != null) difficulty.SliderMultiplier *= ScrollSpeed.Value.Value; if (ScrollSpeed.Value != null) difficulty.BaseSliderVelocity *= ScrollSpeed.Value.Value;
} }
} }
} }

View File

@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Taiko.Mods
public override void ApplyToDifficulty(BeatmapDifficulty difficulty) public override void ApplyToDifficulty(BeatmapDifficulty difficulty)
{ {
base.ApplyToDifficulty(difficulty); base.ApplyToDifficulty(difficulty);
difficulty.SliderMultiplier *= slider_multiplier; difficulty.BaseSliderVelocity *= slider_multiplier;
} }
} }
} }

View File

@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Taiko.Mods
public override void ApplyToDifficulty(BeatmapDifficulty difficulty) public override void ApplyToDifficulty(BeatmapDifficulty difficulty)
{ {
base.ApplyToDifficulty(difficulty); base.ApplyToDifficulty(difficulty);
difficulty.SliderMultiplier *= slider_multiplier; difficulty.BaseSliderVelocity *= slider_multiplier;
} }
} }
} }

View File

@ -68,7 +68,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime); TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
double scoringDistance = base_distance * difficulty.SliderMultiplier * SliderVelocity; double scoringDistance = base_distance * difficulty.BaseSliderVelocity * SliderVelocity;
Velocity = scoringDistance / timingPoint.BeatLength; Velocity = scoringDistance / timingPoint.BeatLength;
tickSpacing = timingPoint.BeatLength / TickRate; tickSpacing = timingPoint.BeatLength / TickRate;

View File

@ -136,7 +136,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
Assert.AreEqual(4, difficulty.CircleSize); Assert.AreEqual(4, difficulty.CircleSize);
Assert.AreEqual(8, difficulty.OverallDifficulty); Assert.AreEqual(8, difficulty.OverallDifficulty);
Assert.AreEqual(9, difficulty.ApproachRate); Assert.AreEqual(9, difficulty.ApproachRate);
Assert.AreEqual(1.8, difficulty.SliderMultiplier); Assert.AreEqual(1.8, difficulty.BaseSliderVelocity);
Assert.AreEqual(2, difficulty.SliderTickRate); Assert.AreEqual(2, difficulty.SliderTickRate);
} }
} }

View File

@ -91,7 +91,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
Assert.AreEqual(4, difficulty.CircleSize); Assert.AreEqual(4, difficulty.CircleSize);
Assert.AreEqual(8, difficulty.OverallDifficulty); Assert.AreEqual(8, difficulty.OverallDifficulty);
Assert.AreEqual(9, difficulty.ApproachRate); Assert.AreEqual(9, difficulty.ApproachRate);
Assert.AreEqual(1.8, difficulty.SliderMultiplier); Assert.AreEqual(1.8, difficulty.BaseSliderVelocity);
Assert.AreEqual(2, difficulty.SliderTickRate); Assert.AreEqual(2, difficulty.SliderTickRate);
} }

View File

@ -57,7 +57,7 @@ namespace osu.Game.Tests.Editing
BeatDivisor.Value = 1; BeatDivisor.Value = 1;
composer.EditorBeatmap.Difficulty.SliderMultiplier = 1; composer.EditorBeatmap.Difficulty.BaseSliderVelocity = 1;
composer.EditorBeatmap.ControlPointInfo.Clear(); composer.EditorBeatmap.ControlPointInfo.Clear();
composer.EditorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = 1000 }); composer.EditorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = 1000 });
}); });
@ -66,7 +66,7 @@ namespace osu.Game.Tests.Editing
[TestCase(2)] [TestCase(2)]
public void TestSliderMultiplier(float multiplier) public void TestSliderMultiplier(float multiplier)
{ {
AddStep($"set slider multiplier = {multiplier}", () => composer.EditorBeatmap.Difficulty.SliderMultiplier = multiplier); AddStep($"set slider multiplier = {multiplier}", () => composer.EditorBeatmap.Difficulty.BaseSliderVelocity = multiplier);
assertSnapDistance(100 * multiplier, null, true); assertSnapDistance(100 * multiplier, null, true);
} }
@ -128,7 +128,7 @@ namespace osu.Game.Tests.Editing
assertDurationToDistance(500, 50); assertDurationToDistance(500, 50);
assertDurationToDistance(1000, 100); assertDurationToDistance(1000, 100);
AddStep("set slider multiplier = 2", () => composer.EditorBeatmap.Difficulty.SliderMultiplier = 2); AddStep("set slider multiplier = 2", () => composer.EditorBeatmap.Difficulty.BaseSliderVelocity = 2);
assertDurationToDistance(500, 100); assertDurationToDistance(500, 100);
assertDurationToDistance(1000, 200); assertDurationToDistance(1000, 200);
@ -149,7 +149,7 @@ namespace osu.Game.Tests.Editing
assertDistanceToDuration(50, 500); assertDistanceToDuration(50, 500);
assertDistanceToDuration(100, 1000); assertDistanceToDuration(100, 1000);
AddStep("set slider multiplier = 2", () => composer.EditorBeatmap.Difficulty.SliderMultiplier = 2); AddStep("set slider multiplier = 2", () => composer.EditorBeatmap.Difficulty.BaseSliderVelocity = 2);
assertDistanceToDuration(100, 500); assertDistanceToDuration(100, 500);
assertDistanceToDuration(200, 1000); assertDistanceToDuration(200, 1000);
@ -174,7 +174,7 @@ namespace osu.Game.Tests.Editing
assertSnappedDuration(200, 2000); assertSnappedDuration(200, 2000);
assertSnappedDuration(250, 3000); assertSnappedDuration(250, 3000);
AddStep("set slider multiplier = 2", () => composer.EditorBeatmap.Difficulty.SliderMultiplier = 2); AddStep("set slider multiplier = 2", () => composer.EditorBeatmap.Difficulty.BaseSliderVelocity = 2);
assertSnappedDuration(0, 0); assertSnappedDuration(0, 0);
assertSnappedDuration(50, 0); assertSnappedDuration(50, 0);
@ -206,7 +206,7 @@ namespace osu.Game.Tests.Editing
assertSnappedDistance(200, 200); assertSnappedDistance(200, 200);
assertSnappedDistance(250, 200); assertSnappedDistance(250, 200);
AddStep("set slider multiplier = 2", () => composer.EditorBeatmap.Difficulty.SliderMultiplier = 2); AddStep("set slider multiplier = 2", () => composer.EditorBeatmap.Difficulty.BaseSliderVelocity = 2);
assertSnappedDistance(50, 0); assertSnappedDistance(50, 0);
assertSnappedDistance(100, 0); assertSnappedDistance(100, 0);

View File

@ -45,7 +45,7 @@ namespace osu.Game.Tests.Visual.Editing
} }
}); });
editorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = beat_length }); editorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = beat_length });
editorBeatmap.Difficulty.SliderMultiplier = 1; editorBeatmap.Difficulty.BaseSliderVelocity = 1;
} }
[SetUp] [SetUp]

View File

@ -184,7 +184,7 @@ namespace osu.Game.Tests.Visual.Gameplay
{ {
var beatmap = createBeatmap(); var beatmap = createBeatmap();
beatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = time_range }); beatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = time_range });
beatmap.Difficulty.SliderMultiplier = 2; beatmap.Difficulty.BaseSliderVelocity = 2;
createTest(beatmap, d => d.RelativeScaleBeatLengthsOverride = true); createTest(beatmap, d => d.RelativeScaleBeatLengthsOverride = true);
AddStep("adjust time range", () => drawableRuleset.TimeRange.Value = 5000); AddStep("adjust time range", () => drawableRuleset.TimeRange.Value = 5000);
@ -198,7 +198,7 @@ namespace osu.Game.Tests.Visual.Gameplay
{ {
var beatmap = createBeatmap(); var beatmap = createBeatmap();
beatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = time_range }); beatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = time_range });
beatmap.Difficulty.SliderMultiplier = 2; beatmap.Difficulty.BaseSliderVelocity = 2;
createTest(beatmap); createTest(beatmap);
AddStep("adjust time range", () => drawableRuleset.TimeRange.Value = 2000); AddStep("adjust time range", () => drawableRuleset.TimeRange.Value = 2000);

View File

@ -46,7 +46,7 @@ namespace osu.Game.Tests.Visual.Gameplay
{ {
BeatmapInfo = new BeatmapInfo BeatmapInfo = new BeatmapInfo
{ {
Difficulty = new BeatmapDifficulty { CircleSize = 6, SliderMultiplier = 3 }, Difficulty = new BeatmapDifficulty { CircleSize = 6, BaseSliderVelocity = 3 },
Ruleset = ruleset Ruleset = ruleset
}, },
ControlPointInfo = controlPointInfo ControlPointInfo = controlPointInfo

View File

@ -11,7 +11,7 @@ namespace osu.Game.Beatmaps
public class BeatmapDifficulty : EmbeddedObject, IBeatmapDifficultyInfo public class BeatmapDifficulty : EmbeddedObject, IBeatmapDifficultyInfo
{ {
/// <summary> /// <summary>
/// The default value used for all difficulty settings except <see cref="SliderMultiplier"/> and <see cref="SliderTickRate"/>. /// The default value used for all difficulty settings except <see cref="BaseSliderVelocity"/> and <see cref="SliderTickRate"/>.
/// </summary> /// </summary>
public const float DEFAULT_DIFFICULTY = 5; public const float DEFAULT_DIFFICULTY = 5;
@ -20,7 +20,7 @@ namespace osu.Game.Beatmaps
public float OverallDifficulty { get; set; } = IBeatmapDifficultyInfo.DEFAULT_DIFFICULTY; public float OverallDifficulty { get; set; } = IBeatmapDifficultyInfo.DEFAULT_DIFFICULTY;
public float ApproachRate { get; set; } = IBeatmapDifficultyInfo.DEFAULT_DIFFICULTY; public float ApproachRate { get; set; } = IBeatmapDifficultyInfo.DEFAULT_DIFFICULTY;
public double SliderMultiplier { get; set; } = 1; public double BaseSliderVelocity { get; set; } = 1;
public double SliderTickRate { get; set; } = 1; public double SliderTickRate { get; set; } = 1;
public BeatmapDifficulty() public BeatmapDifficulty()
@ -44,7 +44,7 @@ namespace osu.Game.Beatmaps
difficulty.CircleSize = CircleSize; difficulty.CircleSize = CircleSize;
difficulty.OverallDifficulty = OverallDifficulty; difficulty.OverallDifficulty = OverallDifficulty;
difficulty.SliderMultiplier = SliderMultiplier; difficulty.BaseSliderVelocity = BaseSliderVelocity;
difficulty.SliderTickRate = SliderTickRate; difficulty.SliderTickRate = SliderTickRate;
} }
@ -55,7 +55,7 @@ namespace osu.Game.Beatmaps
CircleSize = other.CircleSize; CircleSize = other.CircleSize;
OverallDifficulty = other.OverallDifficulty; OverallDifficulty = other.OverallDifficulty;
SliderMultiplier = other.SliderMultiplier; BaseSliderVelocity = other.BaseSliderVelocity;
SliderTickRate = other.SliderTickRate; SliderTickRate = other.SliderTickRate;
} }
} }

View File

@ -353,7 +353,7 @@ namespace osu.Game.Beatmaps
CircleSize = decodedDifficulty.CircleSize, CircleSize = decodedDifficulty.CircleSize,
OverallDifficulty = decodedDifficulty.OverallDifficulty, OverallDifficulty = decodedDifficulty.OverallDifficulty,
ApproachRate = decodedDifficulty.ApproachRate, ApproachRate = decodedDifficulty.ApproachRate,
SliderMultiplier = decodedDifficulty.SliderMultiplier, BaseSliderVelocity = decodedDifficulty.BaseSliderVelocity,
SliderTickRate = decodedDifficulty.SliderTickRate, SliderTickRate = decodedDifficulty.SliderTickRate,
}; };

View File

@ -384,7 +384,7 @@ namespace osu.Game.Beatmaps.Formats
break; break;
case @"SliderMultiplier": case @"SliderMultiplier":
difficulty.SliderMultiplier = Parsing.ParseDouble(pair.Value); difficulty.BaseSliderVelocity = Parsing.ParseDouble(pair.Value);
break; break;
case @"SliderTickRate": case @"SliderTickRate":

View File

@ -155,8 +155,8 @@ namespace osu.Game.Beatmaps.Formats
// Taiko adjusts the slider multiplier (see: LEGACY_TAIKO_VELOCITY_MULTIPLIER) // Taiko adjusts the slider multiplier (see: LEGACY_TAIKO_VELOCITY_MULTIPLIER)
writer.WriteLine(onlineRulesetID == 1 writer.WriteLine(onlineRulesetID == 1
? FormattableString.Invariant($"SliderMultiplier: {beatmap.Difficulty.SliderMultiplier / LEGACY_TAIKO_VELOCITY_MULTIPLIER}") ? FormattableString.Invariant($"SliderMultiplier: {beatmap.Difficulty.BaseSliderVelocity / LEGACY_TAIKO_VELOCITY_MULTIPLIER}")
: FormattableString.Invariant($"SliderMultiplier: {beatmap.Difficulty.SliderMultiplier}")); : FormattableString.Invariant($"SliderMultiplier: {beatmap.Difficulty.BaseSliderVelocity}"));
writer.WriteLine(FormattableString.Invariant($"SliderTickRate: {beatmap.Difficulty.SliderTickRate}")); writer.WriteLine(FormattableString.Invariant($"SliderTickRate: {beatmap.Difficulty.SliderTickRate}"));
} }

View File

@ -9,7 +9,7 @@ namespace osu.Game.Beatmaps
public interface IBeatmapDifficultyInfo public interface IBeatmapDifficultyInfo
{ {
/// <summary> /// <summary>
/// The default value used for all difficulty settings except <see cref="SliderMultiplier"/> and <see cref="SliderTickRate"/>. /// The default value used for all difficulty settings except <see cref="BaseSliderVelocity"/> and <see cref="SliderTickRate"/>.
/// </summary> /// </summary>
const float DEFAULT_DIFFICULTY = 5; const float DEFAULT_DIFFICULTY = 5;
@ -34,9 +34,10 @@ namespace osu.Game.Beatmaps
float ApproachRate { get; } float ApproachRate { get; }
/// <summary> /// <summary>
/// The slider multiplier of the associated beatmap. /// The base slider velocity of the associated beatmap.
/// This was known as "SliderMultiplier" in the .osu format and stable editor.
/// </summary> /// </summary>
double SliderMultiplier { get; } double BaseSliderVelocity { get; }
/// <summary> /// <summary>
/// The slider tick rate of the associated beatmap. /// The slider tick rate of the associated beatmap.

View File

@ -240,7 +240,7 @@ namespace osu.Game.Rulesets.Edit
public virtual float GetBeatSnapDistanceAt(HitObject referenceObject, bool useReferenceSliderVelocity = true) public virtual float GetBeatSnapDistanceAt(HitObject referenceObject, bool useReferenceSliderVelocity = true)
{ {
return (float)(100 * (useReferenceSliderVelocity && referenceObject is IHasSliderVelocity hasSliderVelocity ? hasSliderVelocity.SliderVelocity : 1) * EditorBeatmap.Difficulty.SliderMultiplier * 1 return (float)(100 * (useReferenceSliderVelocity && referenceObject is IHasSliderVelocity hasSliderVelocity ? hasSliderVelocity.SliderVelocity : 1) * EditorBeatmap.Difficulty.BaseSliderVelocity * 1
/ BeatSnapProvider.BeatDivisor); / BeatSnapProvider.BeatDivisor);
} }

View File

@ -55,7 +55,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime); TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
double scoringDistance = base_scoring_distance * difficulty.SliderMultiplier * SliderVelocity; double scoringDistance = base_scoring_distance * difficulty.BaseSliderVelocity * SliderVelocity;
Velocity = scoringDistance / timingPoint.BeatLength; Velocity = scoringDistance / timingPoint.BeatLength;
} }

View File

@ -123,7 +123,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
// The slider multiplier is post-multiplied to determine the final velocity, but for relative scale beat lengths // The slider multiplier is post-multiplied to determine the final velocity, but for relative scale beat lengths
// the multiplier should not affect the effective timing point (the longest in the beatmap), so it is factored out here // the multiplier should not affect the effective timing point (the longest in the beatmap), so it is factored out here
baseBeatLength /= Beatmap.Difficulty.SliderMultiplier; baseBeatLength /= Beatmap.Difficulty.BaseSliderVelocity;
} }
// Merge sequences of timing and difficulty control points to create the aggregate "multiplier" control point // Merge sequences of timing and difficulty control points to create the aggregate "multiplier" control point
@ -150,7 +150,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
return new MultiplierControlPoint(c.Time) return new MultiplierControlPoint(c.Time)
{ {
Velocity = Beatmap.Difficulty.SliderMultiplier, Velocity = Beatmap.Difficulty.BaseSliderVelocity,
BaseBeatLength = baseBeatLength, BaseBeatLength = baseBeatLength,
TimingPoint = lastTimingPoint, TimingPoint = lastTimingPoint,
EffectPoint = lastEffectPoint EffectPoint = lastEffectPoint
@ -167,7 +167,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
ControlPoints.AddRange(timingChanges); ControlPoints.AddRange(timingChanges);
if (ControlPoints.Count == 0) if (ControlPoints.Count == 0)
ControlPoints.Add(new MultiplierControlPoint { Velocity = Beatmap.Difficulty.SliderMultiplier }); ControlPoints.Add(new MultiplierControlPoint { Velocity = Beatmap.Difficulty.BaseSliderVelocity });
} }
protected override void LoadComplete() protected override void LoadComplete()