1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 09:22:54 +08:00

Separate calculation to follow other examples

This commit is contained in:
smoogipoo 2020-01-29 15:16:48 +09:00
parent 29daabb40a
commit 391681b7af

View File

@ -132,7 +132,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected ColourInfo GetColourForIndexFromPlacement(int placementIndex)
{
var timingPoint = beatmap.ControlPointInfo.TimingPointAt(StartTime);
var beatIndex = (int)Math.Round((StartTime - timingPoint.Time) / timingPoint.BeatLength * beatDivisor.Value);
var beatLength = timingPoint.BeatLength / beatDivisor.Value;
var beatIndex = (int)Math.Round((StartTime - timingPoint.Time) / beatLength);
var colour = BindableBeatDivisor.GetColourFor(BindableBeatDivisor.GetDivisorForBeatIndex(beatIndex + placementIndex + 1, beatDivisor.Value), Colours);
int repeatIndex = placementIndex / beatDivisor.Value;