mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 13:37:25 +08:00
Centralise default beat length specification
This commit is contained in:
parent
ecfcbe3723
commit
f6ad95018a
@ -14,6 +14,8 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public TimeSignatures TimeSignature = TimeSignatures.SimpleQuadruple;
|
public TimeSignatures TimeSignature = TimeSignatures.SimpleQuadruple;
|
||||||
|
|
||||||
|
public const double DEFAULT_BEAT_LENGTH = 1000;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The beat length at this control point.
|
/// The beat length at this control point.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -23,7 +25,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
set => beatLength = MathHelper.Clamp(value, 6, 60000);
|
set => beatLength = MathHelper.Clamp(value, 6, 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
private double beatLength = 1000;
|
private double beatLength = DEFAULT_BEAT_LENGTH;
|
||||||
|
|
||||||
public bool Equals(TimingControlPoint other)
|
public bool Equals(TimingControlPoint other)
|
||||||
=> base.Equals(other)
|
=> base.Equals(other)
|
||||||
|
@ -31,7 +31,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private class LegacyDifficultyCalculatorControlPoint : TimingControlPoint
|
private class LegacyDifficultyCalculatorControlPoint : TimingControlPoint
|
||||||
{
|
{
|
||||||
public override double BeatLength { get; set; } = 1000;
|
public override double BeatLength { get; set; } = TimingControlPoint.DEFAULT_BEAT_LENGTH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Timing
|
|||||||
/// The base beat length to scale the <see cref="TimingPoint"/> provided multiplier relative to.
|
/// The base beat length to scale the <see cref="TimingPoint"/> provided multiplier relative to.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <example>For a <see cref="BaseBeatLength"/> of 1000, a <see cref="TimingPoint"/> with a beat length of 500 will increase the multiplier by 2.</example>
|
/// <example>For a <see cref="BaseBeatLength"/> of 1000, a <see cref="TimingPoint"/> with a beat length of 500 will increase the multiplier by 2.</example>
|
||||||
public double BaseBeatLength = 1000;
|
public double BaseBeatLength = TimingControlPoint.DEFAULT_BEAT_LENGTH;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The velocity multiplier.
|
/// The velocity multiplier.
|
||||||
|
@ -113,7 +113,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
|||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
double lastObjectTime = (Objects.LastOrDefault() as IHasEndTime)?.EndTime ?? Objects.LastOrDefault()?.StartTime ?? double.MaxValue;
|
double lastObjectTime = (Objects.LastOrDefault() as IHasEndTime)?.EndTime ?? Objects.LastOrDefault()?.StartTime ?? double.MaxValue;
|
||||||
double baseBeatLength = 1000;
|
double baseBeatLength = TimingControlPoint.DEFAULT_BEAT_LENGTH;
|
||||||
|
|
||||||
if (RelativeScaleBeatLengths)
|
if (RelativeScaleBeatLengths)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user