Fix distance snap grid using wrong colour when reference object is unsnapped

This commit is contained in:
Bartłomiej Dach 2024-09-30 13:32:19 +02:00
parent 75fc57c34b
commit 11fc1f9a1c
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ protected Color4 GetColourForIndexFromPlacement(int placementIndex)
{
var timingPoint = Beatmap.ControlPointInfo.TimingPointAt(StartTime);
double beatLength = timingPoint.BeatLength / beatDivisor.Value;
int beatIndex = (int)Math.Round((StartTime - timingPoint.Time) / beatLength);
int beatIndex = (int)Math.Floor((StartTime - timingPoint.Time) / beatLength);
var colour = BindableBeatDivisor.GetColourFor(BindableBeatDivisor.GetDivisorForBeatIndex(beatIndex + placementIndex + 1, beatDivisor.Value), Colours);