mirror of https://github.com/ppy/osu
Move approach rate to `EffectControlPoint`
This commit is contained in:
parent
4eb09ea1a9
commit
a3d9ab1e2e
|
@ -43,7 +43,7 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, B
|
|||
|
||||
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
|
||||
|
||||
double scoringDistance = base_scoring_distance * difficulty.SliderMultiplier * DifficultyControlPoint.SpeedMultiplier;
|
||||
double scoringDistance = base_scoring_distance * difficulty.SliderMultiplier * DifficultyControlPoint.SliderVelocity;
|
||||
|
||||
Velocity = scoringDistance / timingPoint.BeatLength;
|
||||
TickDistance = scoringDistance / difficulty.SliderTickRate;
|
||||
|
|
|
@ -388,7 +388,7 @@ private void performTest(List<ReplayFrame> frames, Beatmap<ManiaHitObject> beatm
|
|||
},
|
||||
};
|
||||
|
||||
beatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SpeedMultiplier = 0.1f });
|
||||
beatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SliderVelocity = 0.1f });
|
||||
}
|
||||
|
||||
AddStep("load player", () =>
|
||||
|
|
|
@ -148,7 +148,7 @@ private void performTest(List<ManiaHitObject> hitObjects, List<ReplayFrame> fram
|
|||
},
|
||||
});
|
||||
|
||||
Beatmap.Value.Beatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SpeedMultiplier = 0.1f });
|
||||
Beatmap.Value.Beatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SliderVelocity = 0.1f });
|
||||
|
||||
var p = new ScoreAccessibleReplayPlayer(new Score { Replay = new Replay { Frames = frames } });
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public DistanceObjectPatternGenerator(FastRandom random, HitObject hitObject, Ma
|
|||
#pragma warning restore 618
|
||||
beatLength = timingPoint.BeatLength * legacyDifficultyPoint.BpmMultiplier;
|
||||
else
|
||||
beatLength = timingPoint.BeatLength / difficultyPoint.SpeedMultiplier;
|
||||
beatLength = timingPoint.BeatLength / difficultyPoint.SliderVelocity;
|
||||
|
||||
SpanCount = repeatsData?.SpanCount() ?? 1;
|
||||
StartTime = (int)Math.Round(hitObject.StartTime);
|
||||
|
|
|
@ -407,7 +407,7 @@ private void performTest(List<OsuHitObject> hitObjects, List<ReplayFrame> frames
|
|||
},
|
||||
});
|
||||
|
||||
Beatmap.Value.Beatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SpeedMultiplier = 0.1f });
|
||||
Beatmap.Value.Beatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SliderVelocity = 0.1f });
|
||||
|
||||
SelectedMods.Value = new[] { new OsuModClassic() };
|
||||
|
||||
|
|
|
@ -329,7 +329,7 @@ private Drawable createCatmull(int repeats = 0)
|
|||
private Drawable createDrawable(Slider slider, float circleSize, double speedMultiplier)
|
||||
{
|
||||
var cpi = new ControlPointInfo();
|
||||
cpi.Add(0, new DifficultyControlPoint { SpeedMultiplier = speedMultiplier });
|
||||
cpi.Add(0, new DifficultyControlPoint { SliderVelocity = speedMultiplier });
|
||||
|
||||
slider.ApplyDefaults(cpi, new BeatmapDifficulty { CircleSize = circleSize, SliderTickRate = 3 });
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ private void performTest(List<ReplayFrame> frames)
|
|||
},
|
||||
});
|
||||
|
||||
Beatmap.Value.Beatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SpeedMultiplier = 0.1f });
|
||||
Beatmap.Value.Beatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SliderVelocity = 0.1f });
|
||||
|
||||
var p = new ScoreAccessibleReplayPlayer(new Score { Replay = new Replay { Frames = frames } });
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ private void performTest(List<OsuHitObject> hitObjects, List<ReplayFrame> frames
|
|||
},
|
||||
});
|
||||
|
||||
Beatmap.Value.Beatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SpeedMultiplier = 0.1f });
|
||||
Beatmap.Value.Beatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SliderVelocity = 0.1f });
|
||||
|
||||
var p = new ScoreAccessibleReplayPlayer(new Score { Replay = new Replay { Frames = frames } });
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ protected override IEnumerable<OsuHitObject> ConvertHitObject(HitObject original
|
|||
LegacyLastTickOffset = (original as IHasLegacyLastTickOffset)?.LegacyLastTickOffset,
|
||||
// prior to v8, speed multipliers don't adjust for how many ticks are generated over the same distance.
|
||||
// this results in more (or less) ticks being generated in <v8 maps for the same time duration.
|
||||
TickDistanceMultiplier = beatmap.BeatmapInfo.BeatmapVersion < 8 ? 1f / ((LegacyControlPointInfo)beatmap.ControlPointInfo).DifficultyPointAt(original.StartTime).SpeedMultiplier : 1
|
||||
TickDistanceMultiplier = beatmap.BeatmapInfo.BeatmapVersion < 8 ? 1f / ((LegacyControlPointInfo)beatmap.ControlPointInfo).DifficultyPointAt(original.StartTime).SliderVelocity : 1
|
||||
}.Yield();
|
||||
|
||||
case IHasDuration endTimeData:
|
||||
|
|
|
@ -141,7 +141,7 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, B
|
|||
|
||||
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
|
||||
|
||||
double scoringDistance = BASE_SCORING_DISTANCE * difficulty.SliderMultiplier * DifficultyControlPoint.SpeedMultiplier;
|
||||
double scoringDistance = BASE_SCORING_DISTANCE * difficulty.SliderMultiplier * DifficultyControlPoint.SliderVelocity;
|
||||
|
||||
Velocity = scoringDistance / timingPoint.BeatLength;
|
||||
TickDistance = scoringDistance / difficulty.SliderTickRate * TickDistanceMultiplier;
|
||||
|
|
|
@ -162,7 +162,7 @@ private bool shouldConvertSliderToHits(HitObject obj, IBeatmap beatmap, IHasDist
|
|||
#pragma warning restore 618
|
||||
beatLength = timingPoint.BeatLength * legacyDifficultyPoint.BpmMultiplier;
|
||||
else
|
||||
beatLength = timingPoint.BeatLength / difficultyPoint.SpeedMultiplier;
|
||||
beatLength = timingPoint.BeatLength / difficultyPoint.SliderVelocity;
|
||||
|
||||
double sliderScoringPointDistance = osu_base_scoring_distance * beatmap.BeatmapInfo.BaseDifficulty.SliderMultiplier / beatmap.BeatmapInfo.BaseDifficulty.SliderTickRate;
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject,
|
|||
protected double MultiplierAt(HitObject obj)
|
||||
{
|
||||
double beatLength = controlPointInfo.TimingPointAt(obj.StartTime).BeatLength;
|
||||
double speedMultiplier = obj.DifficultyControlPoint.SpeedMultiplier;
|
||||
double speedMultiplier = obj.DifficultyControlPoint.SliderVelocity;
|
||||
|
||||
return speedMultiplier * TimingControlPoint.DEFAULT_BEAT_LENGTH / beatLength;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, B
|
|||
|
||||
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
|
||||
|
||||
double scoringDistance = base_distance * difficulty.SliderMultiplier * DifficultyControlPoint.SpeedMultiplier;
|
||||
double scoringDistance = base_distance * difficulty.SliderMultiplier * DifficultyControlPoint.SliderVelocity;
|
||||
Velocity = scoringDistance / timingPoint.BeatLength;
|
||||
|
||||
tickSpacing = timingPoint.BeatLength / TickRate;
|
||||
|
|
|
@ -191,15 +191,15 @@ public void TestDecodeBeatmapTimingPoints()
|
|||
|
||||
var difficultyPoint = controlPoints.DifficultyPointAt(0);
|
||||
Assert.AreEqual(0, difficultyPoint.Time);
|
||||
Assert.AreEqual(1.0, difficultyPoint.SpeedMultiplier);
|
||||
Assert.AreEqual(1.0, difficultyPoint.SliderVelocity);
|
||||
|
||||
difficultyPoint = controlPoints.DifficultyPointAt(48428);
|
||||
Assert.AreEqual(0, difficultyPoint.Time);
|
||||
Assert.AreEqual(1.0, difficultyPoint.SpeedMultiplier);
|
||||
Assert.AreEqual(1.0, difficultyPoint.SliderVelocity);
|
||||
|
||||
difficultyPoint = controlPoints.DifficultyPointAt(116999);
|
||||
Assert.AreEqual(116999, difficultyPoint.Time);
|
||||
Assert.AreEqual(0.75, difficultyPoint.SpeedMultiplier, 0.1);
|
||||
Assert.AreEqual(0.75, difficultyPoint.SliderVelocity, 0.1);
|
||||
|
||||
var soundPoint = controlPoints.SamplePointAt(0);
|
||||
Assert.AreEqual(956, soundPoint.Time);
|
||||
|
@ -248,10 +248,10 @@ public void TestDecodeOverlappingTimingPoints()
|
|||
Assert.That(controlPoints.EffectPoints.Count, Is.EqualTo(3));
|
||||
Assert.That(controlPoints.SamplePoints.Count, Is.EqualTo(3));
|
||||
|
||||
Assert.That(controlPoints.DifficultyPointAt(500).SpeedMultiplier, Is.EqualTo(1.5).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(1500).SpeedMultiplier, Is.EqualTo(1.5).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(2500).SpeedMultiplier, Is.EqualTo(0.75).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(3500).SpeedMultiplier, Is.EqualTo(1.5).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(500).SliderVelocity, Is.EqualTo(1.5).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(1500).SliderVelocity, Is.EqualTo(1.5).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(2500).SliderVelocity, Is.EqualTo(0.75).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(3500).SliderVelocity, Is.EqualTo(1.5).Within(0.1));
|
||||
|
||||
Assert.That(controlPoints.EffectPointAt(500).KiaiMode, Is.True);
|
||||
Assert.That(controlPoints.EffectPointAt(1500).KiaiMode, Is.True);
|
||||
|
@ -280,8 +280,8 @@ public void TestTimingPointResetsSpeedMultiplier()
|
|||
{
|
||||
var controlPoints = (LegacyControlPointInfo)decoder.Decode(stream).ControlPointInfo;
|
||||
|
||||
Assert.That(controlPoints?.DifficultyPointAt(0).SpeedMultiplier, Is.EqualTo(0.5).Within(0.1));
|
||||
Assert.That(controlPoints?.DifficultyPointAt(2000).SpeedMultiplier, Is.EqualTo(1).Within(0.1));
|
||||
Assert.That(controlPoints?.DifficultyPointAt(0).SliderVelocity, Is.EqualTo(0.5).Within(0.1));
|
||||
Assert.That(controlPoints?.DifficultyPointAt(2000).SliderVelocity, Is.EqualTo(1).Within(0.1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -395,10 +395,10 @@ public void TestDecodeControlPointDifficultyChange()
|
|||
{
|
||||
var controlPointInfo = (LegacyControlPointInfo)decoder.Decode(stream).ControlPointInfo;
|
||||
|
||||
Assert.That(controlPointInfo.DifficultyPointAt(5).SpeedMultiplier, Is.EqualTo(1));
|
||||
Assert.That(controlPointInfo.DifficultyPointAt(1000).SpeedMultiplier, Is.EqualTo(10));
|
||||
Assert.That(controlPointInfo.DifficultyPointAt(2000).SpeedMultiplier, Is.EqualTo(1.8518518518518519d));
|
||||
Assert.That(controlPointInfo.DifficultyPointAt(3000).SpeedMultiplier, Is.EqualTo(0.5));
|
||||
Assert.That(controlPointInfo.DifficultyPointAt(5).SliderVelocity, Is.EqualTo(1));
|
||||
Assert.That(controlPointInfo.DifficultyPointAt(1000).SliderVelocity, Is.EqualTo(10));
|
||||
Assert.That(controlPointInfo.DifficultyPointAt(2000).SliderVelocity, Is.EqualTo(1.8518518518518519d));
|
||||
Assert.That(controlPointInfo.DifficultyPointAt(3000).SliderVelocity, Is.EqualTo(0.5));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public void Setup() => Schedule(() =>
|
|||
composer.EditorBeatmap.BeatmapInfo.BaseDifficulty.SliderMultiplier = 1;
|
||||
composer.EditorBeatmap.ControlPointInfo.Clear();
|
||||
|
||||
composer.EditorBeatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SpeedMultiplier = 1 });
|
||||
composer.EditorBeatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SliderVelocity = 1 });
|
||||
composer.EditorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = 1000 });
|
||||
});
|
||||
|
||||
|
@ -76,7 +76,7 @@ public void TestSpeedMultiplier(float multiplier)
|
|||
AddStep($"set multiplier = {multiplier}", () =>
|
||||
{
|
||||
composer.EditorBeatmap.ControlPointInfo.Clear();
|
||||
composer.EditorBeatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SpeedMultiplier = multiplier });
|
||||
composer.EditorBeatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SliderVelocity = multiplier });
|
||||
});
|
||||
|
||||
assertSnapDistance(100 * multiplier);
|
||||
|
|
|
@ -55,7 +55,7 @@ public void TestAddRedundantDifficulty()
|
|||
Assert.That(cpi.DifficultyPoints.Count, Is.EqualTo(0));
|
||||
Assert.That(cpi.AllControlPoints.Count(), Is.EqualTo(0));
|
||||
|
||||
cpi.Add(1000, new DifficultyControlPoint { SpeedMultiplier = 2 }); // is not redundant
|
||||
cpi.Add(1000, new DifficultyControlPoint { SliderVelocity = 2 }); // is not redundant
|
||||
|
||||
Assert.That(cpi.Groups.Count, Is.EqualTo(1));
|
||||
Assert.That(cpi.DifficultyPoints.Count, Is.EqualTo(1));
|
||||
|
@ -180,11 +180,11 @@ public void TestAddDuplicateControlPointToGroup()
|
|||
Assert.That(cpi.Groups.Count, Is.EqualTo(1));
|
||||
|
||||
group.Add(new DifficultyControlPoint());
|
||||
group.Add(new DifficultyControlPoint { SpeedMultiplier = 2 });
|
||||
group.Add(new DifficultyControlPoint { SliderVelocity = 2 });
|
||||
|
||||
Assert.That(group.ControlPoints.Count, Is.EqualTo(1));
|
||||
Assert.That(cpi.DifficultyPoints.Count, Is.EqualTo(1));
|
||||
Assert.That(cpi.DifficultyPoints.First().SpeedMultiplier, Is.EqualTo(2));
|
||||
Assert.That(cpi.DifficultyPoints.First().SliderVelocity, Is.EqualTo(2));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -214,8 +214,8 @@ public void TestOrdering()
|
|||
cpi.Add(1000, new TimingControlPoint { BeatLength = 500 });
|
||||
cpi.Add(10000, new TimingControlPoint { BeatLength = 200 });
|
||||
cpi.Add(5000, new TimingControlPoint { BeatLength = 100 });
|
||||
cpi.Add(3000, new DifficultyControlPoint { SpeedMultiplier = 2 });
|
||||
cpi.GroupAt(7000, true).Add(new DifficultyControlPoint { SpeedMultiplier = 4 });
|
||||
cpi.Add(3000, new DifficultyControlPoint { SliderVelocity = 2 });
|
||||
cpi.GroupAt(7000, true).Add(new DifficultyControlPoint { SliderVelocity = 4 });
|
||||
cpi.GroupAt(1000).Add(new SampleControlPoint { SampleVolume = 0 });
|
||||
cpi.GroupAt(8000, true).Add(new EffectControlPoint { KiaiMode = true });
|
||||
|
||||
|
@ -236,8 +236,8 @@ public void TestClear()
|
|||
cpi.Add(1000, new TimingControlPoint { BeatLength = 500 });
|
||||
cpi.Add(10000, new TimingControlPoint { BeatLength = 200 });
|
||||
cpi.Add(5000, new TimingControlPoint { BeatLength = 100 });
|
||||
cpi.Add(3000, new DifficultyControlPoint { SpeedMultiplier = 2 });
|
||||
cpi.GroupAt(7000, true).Add(new DifficultyControlPoint { SpeedMultiplier = 4 });
|
||||
cpi.Add(3000, new DifficultyControlPoint { SliderVelocity = 2 });
|
||||
cpi.GroupAt(7000, true).Add(new DifficultyControlPoint { SliderVelocity = 4 });
|
||||
cpi.GroupAt(1000).Add(new SampleControlPoint { SampleVolume = 0 });
|
||||
cpi.GroupAt(8000, true).Add(new EffectControlPoint { KiaiMode = true });
|
||||
|
||||
|
|
|
@ -93,9 +93,9 @@ private void setUpHitObjects() => AddStep("set up hit objects", () =>
|
|||
|
||||
private IList<MultiplierControlPoint> testControlPoints => new List<MultiplierControlPoint>
|
||||
{
|
||||
new MultiplierControlPoint(time_range) { DifficultyPoint = { SpeedMultiplier = 1.25 } },
|
||||
new MultiplierControlPoint(1.5 * time_range) { DifficultyPoint = { SpeedMultiplier = 1 } },
|
||||
new MultiplierControlPoint(2 * time_range) { DifficultyPoint = { SpeedMultiplier = 1.5 } }
|
||||
new MultiplierControlPoint(time_range) { DifficultyPoint = { SliderVelocity = 1.25 } },
|
||||
new MultiplierControlPoint(1.5 * time_range) { DifficultyPoint = { SliderVelocity = 1 } },
|
||||
new MultiplierControlPoint(2 * time_range) { DifficultyPoint = { SliderVelocity = 1.5 } }
|
||||
};
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -7,17 +7,20 @@
|
|||
|
||||
namespace osu.Game.Beatmaps.ControlPoints
|
||||
{
|
||||
/// <remarks>
|
||||
/// Note that going forward, this control point type should always be assigned directly to HitObjects.
|
||||
/// </remarks>
|
||||
public class DifficultyControlPoint : ControlPoint
|
||||
{
|
||||
public static readonly DifficultyControlPoint DEFAULT = new DifficultyControlPoint
|
||||
{
|
||||
SpeedMultiplierBindable = { Disabled = true },
|
||||
SliderVelocityBindable = { Disabled = true },
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The speed multiplier at this control point.
|
||||
/// The slider velocity at this control point.
|
||||
/// </summary>
|
||||
public readonly BindableDouble SpeedMultiplierBindable = new BindableDouble(1)
|
||||
public readonly BindableDouble SliderVelocityBindable = new BindableDouble(1)
|
||||
{
|
||||
Precision = 0.01,
|
||||
Default = 1,
|
||||
|
@ -30,19 +33,19 @@ public class DifficultyControlPoint : ControlPoint
|
|||
/// <summary>
|
||||
/// The speed multiplier at this control point.
|
||||
/// </summary>
|
||||
public double SpeedMultiplier
|
||||
public double SliderVelocity
|
||||
{
|
||||
get => SpeedMultiplierBindable.Value;
|
||||
set => SpeedMultiplierBindable.Value = value;
|
||||
get => SliderVelocityBindable.Value;
|
||||
set => SliderVelocityBindable.Value = value;
|
||||
}
|
||||
|
||||
public override bool IsRedundant(ControlPoint existing)
|
||||
=> existing is DifficultyControlPoint existingDifficulty
|
||||
&& SpeedMultiplier == existingDifficulty.SpeedMultiplier;
|
||||
&& SliderVelocity == existingDifficulty.SliderVelocity;
|
||||
|
||||
public override void CopyFrom(ControlPoint other)
|
||||
{
|
||||
SpeedMultiplier = ((DifficultyControlPoint)other).SpeedMultiplier;
|
||||
SliderVelocity = ((DifficultyControlPoint)other).SliderVelocity;
|
||||
|
||||
base.CopyFrom(other);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,8 @@ public class EffectControlPoint : ControlPoint
|
|||
public static readonly EffectControlPoint DEFAULT = new EffectControlPoint
|
||||
{
|
||||
KiaiModeBindable = { Disabled = true },
|
||||
OmitFirstBarLineBindable = { Disabled = true }
|
||||
OmitFirstBarLineBindable = { Disabled = true },
|
||||
ApproachRateBindable = { Disabled = true }
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -20,6 +21,26 @@ public class EffectControlPoint : ControlPoint
|
|||
/// </summary>
|
||||
public readonly BindableBool OmitFirstBarLineBindable = new BindableBool();
|
||||
|
||||
/// <summary>
|
||||
/// The relative approach rate at this control point.
|
||||
/// </summary>
|
||||
public readonly BindableDouble ApproachRateBindable = new BindableDouble(1)
|
||||
{
|
||||
Precision = 0.01,
|
||||
Default = 1,
|
||||
MinValue = 0.01,
|
||||
MaxValue = 10
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The relative approach rate.
|
||||
/// </summary>
|
||||
public double ApproachRate
|
||||
{
|
||||
get => ApproachRateBindable.Value;
|
||||
set => ApproachRateBindable.Value = value;
|
||||
}
|
||||
|
||||
public override Color4 GetRepresentingColour(OsuColour colours) => colours.Purple;
|
||||
|
||||
/// <summary>
|
||||
|
@ -49,12 +70,14 @@ public override bool IsRedundant(ControlPoint existing)
|
|||
=> !OmitFirstBarLine
|
||||
&& existing is EffectControlPoint existingEffect
|
||||
&& KiaiMode == existingEffect.KiaiMode
|
||||
&& OmitFirstBarLine == existingEffect.OmitFirstBarLine;
|
||||
&& OmitFirstBarLine == existingEffect.OmitFirstBarLine
|
||||
&& ApproachRate == existingEffect.ApproachRate;
|
||||
|
||||
public override void CopyFrom(ControlPoint other)
|
||||
{
|
||||
KiaiMode = ((EffectControlPoint)other).KiaiMode;
|
||||
OmitFirstBarLine = ((EffectControlPoint)other).OmitFirstBarLine;
|
||||
ApproachRate = ((EffectControlPoint)other).ApproachRate;
|
||||
|
||||
base.CopyFrom(other);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace osu.Game.Beatmaps.ControlPoints
|
||||
{
|
||||
/// <remarks>
|
||||
/// Note that going forward, this control point type should always be assigned directly to HitObjects.
|
||||
/// </remarks>
|
||||
public class SampleControlPoint : ControlPoint
|
||||
{
|
||||
public const string DEFAULT_BANK = "normal";
|
||||
|
|
|
@ -380,7 +380,7 @@ private void handleTimingPoint(string line)
|
|||
addControlPoint(time, new LegacyDifficultyControlPoint(beatLength)
|
||||
#pragma warning restore 618
|
||||
{
|
||||
SpeedMultiplier = speedMultiplier,
|
||||
SliderVelocity = speedMultiplier,
|
||||
}, timingChange);
|
||||
|
||||
addControlPoint(time, new EffectControlPoint
|
||||
|
|
|
@ -219,7 +219,7 @@ private void handleControlPoints(TextWriter writer)
|
|||
// Output any remaining effects as secondary non-timing control point.
|
||||
var difficultyPoint = ((LegacyControlPointInfo)beatmap.ControlPointInfo).DifficultyPointAt(group.Time);
|
||||
writer.Write(FormattableString.Invariant($"{group.Time},"));
|
||||
writer.Write(FormattableString.Invariant($"{-100 / difficultyPoint.SpeedMultiplier},"));
|
||||
writer.Write(FormattableString.Invariant($"{-100 / difficultyPoint.SliderVelocity},"));
|
||||
outputControlPointAt(group.Time, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ public LegacyDifficultyControlPoint(double beatLength)
|
|||
|
||||
public LegacyDifficultyControlPoint()
|
||||
{
|
||||
SpeedMultiplierBindable.Precision = double.Epsilon;
|
||||
SliderVelocityBindable.Precision = double.Epsilon;
|
||||
}
|
||||
|
||||
public override void CopyFrom(ControlPoint other)
|
||||
|
|
|
@ -392,7 +392,7 @@ public override SnapResult SnapScreenSpacePositionToValidTime(Vector2 screenSpac
|
|||
public override float GetBeatSnapDistanceAt(double referenceTime)
|
||||
{
|
||||
DifficultyControlPoint difficultyPoint = EditorBeatmap.ControlPointInfo.DifficultyPointAt(referenceTime);
|
||||
return (float)(100 * EditorBeatmap.BeatmapInfo.BaseDifficulty.SliderMultiplier * difficultyPoint.SpeedMultiplier / BeatSnapProvider.BeatDivisor);
|
||||
return (float)(100 * EditorBeatmap.BeatmapInfo.BaseDifficulty.SliderMultiplier * difficultyPoint.SliderVelocity / BeatSnapProvider.BeatDivisor);
|
||||
}
|
||||
|
||||
public override float DurationToDistance(double referenceTime, double duration)
|
||||
|
|
|
@ -44,7 +44,7 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, B
|
|||
|
||||
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
|
||||
|
||||
double scoringDistance = base_scoring_distance * difficulty.SliderMultiplier * DifficultyControlPoint.SpeedMultiplier;
|
||||
double scoringDistance = base_scoring_distance * difficulty.SliderMultiplier * DifficultyControlPoint.SliderVelocity;
|
||||
|
||||
Velocity = scoringDistance / timingPoint.BeatLength;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class MultiplierControlPoint : IComparable<MultiplierControlPoint>
|
|||
/// <summary>
|
||||
/// The aggregate multiplier which this <see cref="MultiplierControlPoint"/> provides.
|
||||
/// </summary>
|
||||
public double Multiplier => Velocity * DifficultyPoint.SpeedMultiplier * BaseBeatLength / TimingPoint.BeatLength;
|
||||
public double Multiplier => Velocity * DifficultyPoint.SliderVelocity * BaseBeatLength / TimingPoint.BeatLength;
|
||||
|
||||
/// <summary>
|
||||
/// The base beat length to scale the <see cref="TimingPoint"/> provided multiplier relative to.
|
||||
|
|
|
@ -13,7 +13,7 @@ public class DifficultyPointPiece : TopPointPiece
|
|||
public DifficultyPointPiece(DifficultyControlPoint point)
|
||||
: base(point)
|
||||
{
|
||||
speedMultiplier = point.SpeedMultiplierBindable.GetBoundCopy();
|
||||
speedMultiplier = point.SliderVelocityBindable.GetBoundCopy();
|
||||
|
||||
Y = Height;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ private void load()
|
|||
{
|
||||
multiplierSlider = new SliderWithTextBoxInput<double>("Speed Multiplier")
|
||||
{
|
||||
Current = new DifficultyControlPoint().SpeedMultiplierBindable,
|
||||
Current = new DifficultyControlPoint().SliderVelocityBindable,
|
||||
KeyboardStep = 0.1f
|
||||
}
|
||||
});
|
||||
|
@ -28,12 +28,12 @@ protected override void OnControlPointChanged(ValueChangedEvent<DifficultyContro
|
|||
{
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
var selectedPointBindable = point.NewValue.SpeedMultiplierBindable;
|
||||
var selectedPointBindable = point.NewValue.SliderVelocityBindable;
|
||||
|
||||
// there may be legacy control points, which contain infinite precision for compatibility reasons (see LegacyDifficultyControlPoint).
|
||||
// generally that level of precision could only be set by externally editing the .osu file, so at the point
|
||||
// a user is looking to update this within the editor it should be safe to obliterate this additional precision.
|
||||
double expectedPrecision = new DifficultyControlPoint().SpeedMultiplierBindable.Precision;
|
||||
double expectedPrecision = new DifficultyControlPoint().SliderVelocityBindable.Precision;
|
||||
if (selectedPointBindable.Precision < expectedPrecision)
|
||||
selectedPointBindable.Precision = expectedPrecision;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ public class DifficultyRowAttribute : RowAttribute
|
|||
public DifficultyRowAttribute(DifficultyControlPoint difficulty)
|
||||
: base(difficulty, "difficulty")
|
||||
{
|
||||
speedMultiplier = difficulty.SpeedMultiplierBindable.GetBoundCopy();
|
||||
speedMultiplier = difficulty.SliderVelocityBindable.GetBoundCopy();
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
|
Loading…
Reference in New Issue