mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 02:32:59 +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>
|
||||
public TimeSignatures TimeSignature = TimeSignatures.SimpleQuadruple;
|
||||
|
||||
public const double DEFAULT_BEAT_LENGTH = 1000;
|
||||
|
||||
/// <summary>
|
||||
/// The beat length at this control point.
|
||||
/// </summary>
|
||||
@ -23,7 +25,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
set => beatLength = MathHelper.Clamp(value, 6, 60000);
|
||||
}
|
||||
|
||||
private double beatLength = 1000;
|
||||
private double beatLength = DEFAULT_BEAT_LENGTH;
|
||||
|
||||
public bool Equals(TimingControlPoint other)
|
||||
=> base.Equals(other)
|
||||
|
@ -31,7 +31,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
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.
|
||||
/// </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>
|
||||
public double BaseBeatLength = 1000;
|
||||
public double BaseBeatLength = TimingControlPoint.DEFAULT_BEAT_LENGTH;
|
||||
|
||||
/// <summary>
|
||||
/// The velocity multiplier.
|
||||
|
@ -113,7 +113,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
private void load()
|
||||
{
|
||||
double lastObjectTime = (Objects.LastOrDefault() as IHasEndTime)?.EndTime ?? Objects.LastOrDefault()?.StartTime ?? double.MaxValue;
|
||||
double baseBeatLength = 1000;
|
||||
double baseBeatLength = TimingControlPoint.DEFAULT_BEAT_LENGTH;
|
||||
|
||||
if (RelativeScaleBeatLengths)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user