Make reverse arrow animate faster via divisor specification

Adds MinimumBeatLength to BeatSyncedContainer to make sure things don't get out of hand.
This commit is contained in:
Dean Herbert
2020-01-14 01:39:45 +09:00
parent 45cf65a28a
commit 619fe29871
2 changed files with 11 additions and 0 deletions

View File

@ -38,6 +38,11 @@ namespace osu.Game.Graphics.Containers
/// </summary>
public int Divisor { get; set; } = 1;
/// <summary>
/// An optional minimum beat length. Any beat length below this will be multiplied by two until valid.
/// </summary>
public double MinimumBeatLength { get; set; }
/// <summary>
/// Default length of a beat in milliseconds. Used whenever there is no beatmap or track playing.
/// </summary>
@ -89,6 +94,9 @@ namespace osu.Game.Graphics.Containers
double beatLength = timingPoint.BeatLength / Divisor;
while (beatLength < MinimumBeatLength)
beatLength *= 2;
int beatIndex = (int)((currentTrackTime - timingPoint.Time) / beatLength) - (effectPoint.OmitFirstBarLine ? 1 : 0);
// The beats before the start of the first control point are off by 1, this should do the trick