1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:03:22 +08:00

Allow TimingControlPoint to be overridden

This commit is contained in:
smoogipoo 2018-10-09 11:34:38 +09:00
parent f8eaccddda
commit b7499fa956
2 changed files with 9 additions and 7 deletions

View File

@ -16,7 +16,7 @@ namespace osu.Game.Beatmaps.ControlPoints
/// <summary>
/// The beat length at this control point.
/// </summary>
public double BeatLength
public virtual double BeatLength
{
get => beatLength;
set => beatLength = MathHelper.Clamp(value, 6, 60000);

View File

@ -318,12 +318,12 @@ namespace osu.Game.Beatmaps.Formats
if (timingChange)
{
handleTimingControlPoint(new TimingControlPoint
{
Time = time,
BeatLength = beatLength,
TimeSignature = timeSignature
});
var controlPoint = CreateTimingControlPoint();
controlPoint.Time = time;
controlPoint.BeatLength = beatLength;
controlPoint.TimeSignature = timeSignature;
handleTimingControlPoint(controlPoint);
}
handleDifficultyControlPoint(new DifficultyControlPoint
@ -418,6 +418,8 @@ namespace osu.Game.Beatmaps.Formats
private double getOffsetTime(double time) => time + (ApplyOffsets ? offset : 0);
protected virtual TimingControlPoint CreateTimingControlPoint() => new TimingControlPoint();
[Flags]
internal enum EffectFlags
{