mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 23:12:55 +08:00
Merge pull request #3815 from smoogipoo/fix-incorrect-samples
Add 1ms offset to controlpoint lookup times
This commit is contained in:
commit
2d68a6c181
@ -19,6 +19,11 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class HitObject
|
public class HitObject
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A small adjustment to the start time of control points to account for rounding/precision errors.
|
||||||
|
/// </summary>
|
||||||
|
private const double control_point_leniency = 1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The time at which the HitObject starts.
|
/// The time at which the HitObject starts.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -70,7 +75,7 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
||||||
|
|
||||||
// This is done here since ApplyDefaultsToSelf may be used to determine the end time
|
// 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();
|
nestedHitObjects.Clear();
|
||||||
|
|
||||||
@ -87,7 +92,7 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
|
|
||||||
protected virtual void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
protected virtual void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
||||||
{
|
{
|
||||||
Kiai = controlPointInfo.EffectPointAt(StartTime).KiaiMode;
|
Kiai = controlPointInfo.EffectPointAt(StartTime + control_point_leniency).KiaiMode;
|
||||||
|
|
||||||
if (HitWindows == null)
|
if (HitWindows == null)
|
||||||
HitWindows = CreateHitWindows();
|
HitWindows = CreateHitWindows();
|
||||||
|
Loading…
Reference in New Issue
Block a user