Merge branch 'master' into fix-home-button-cancel

This commit is contained in:
Dean Herbert 2018-12-04 12:53:11 +09:00 committed by GitHub
commit 1913dc7365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -19,6 +19,11 @@ namespace osu.Game.Rulesets.Objects
/// </summary>
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>
/// The time at which the HitObject starts.
/// </summary>
@ -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();