1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 03:43:21 +08:00

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

View File

@ -155,7 +155,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
{
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);