From 9fdd48ded2dcc19dff857b0e0c8508559a7552ea Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 4 Dec 2018 12:01:30 +0900 Subject: [PATCH] Add 1ms offset to controlpoint lookup times --- osu.Game/Rulesets/Objects/HitObject.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/osu.Game/Rulesets/Objects/HitObject.cs b/osu.Game/Rulesets/Objects/HitObject.cs index 024c1d015a..010fc450e0 100644 --- a/osu.Game/Rulesets/Objects/HitObject.cs +++ b/osu.Game/Rulesets/Objects/HitObject.cs @@ -19,6 +19,11 @@ namespace osu.Game.Rulesets.Objects /// public class HitObject { + /// + /// A small adjustment to the start time of control points to account for rounding/precision errors. + /// + private const double control_point_leniency = 1; + /// /// The time at which the HitObject starts. /// @@ -70,7 +75,7 @@ public void ApplyDefaults(ControlPointInfo controlPointInfo, BeatmapDifficulty d ApplyDefaultsToSelf(controlPointInfo, difficulty); // This is done here since ApplyDefaultsToSelf may be used to determine the end time - SampleControlPoint = controlPointInfo.SamplePointAt((this as IHasEndTime)?.EndTime ?? StartTime); + SampleControlPoint = controlPointInfo.SamplePointAt(((this as IHasEndTime)?.EndTime ?? StartTime) + control_point_leniency); nestedHitObjects.Clear(); @@ -87,7 +92,7 @@ public void ApplyDefaults(ControlPointInfo controlPointInfo, BeatmapDifficulty d protected virtual void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty) { - Kiai = controlPointInfo.EffectPointAt(StartTime).KiaiMode; + Kiai = controlPointInfo.EffectPointAt(StartTime + control_point_leniency).KiaiMode; if (HitWindows == null) HitWindows = CreateHitWindows();