diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs index af947817c0..7462478408 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs @@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables { private readonly Slider slider; - public readonly DrawableHitCircle InitialCircle; + public readonly DrawableHitCircle HeadCircle; private readonly List components = new List(); @@ -51,27 +51,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables AlwaysPresent = true, Alpha = 0 }, - InitialCircle = new DrawableHitCircle(new HitCircle - { - StartTime = s.StartTime, - Position = s.StackedPosition, - IndexInCurrentCombo = s.IndexInCurrentCombo, - Scale = s.Scale, - ComboColour = s.ComboColour, - Samples = s.Samples, - SampleControlPoint = s.SampleControlPoint, - TimePreempt = s.TimePreempt, - TimeFadein = s.TimeFadein, - HitWindow300 = s.HitWindow300, - HitWindow100 = s.HitWindow100, - HitWindow50 = s.HitWindow50 - }) + HeadCircle = new DrawableHitCircle(s.HeadCircle) }; components.Add(Body); components.Add(Ball); - AddNested(InitialCircle); + AddNested(HeadCircle); foreach (var tick in s.NestedHitObjects.OfType()) { @@ -121,8 +107,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables currentSpan = span; //todo: we probably want to reconsider this before adding scoring, but it looks and feels nice. - if (!InitialCircle.Judgements.Any(j => j.IsHit)) - InitialCircle.Position = slider.Curve.PositionAt(progress); + if (!HeadCircle.Judgements.Any(j => j.IsHit)) + HeadCircle.Position = slider.Curve.PositionAt(progress); foreach (var c in components.OfType()) c.UpdateProgress(progress, span); foreach (var c in components.OfType()) c.UpdateSnakingPosition(slider.Curve.PositionAt(Body.SnakedStart ?? 0), slider.Curve.PositionAt(Body.SnakedEnd ?? 0)); @@ -135,13 +121,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables { var judgementsCount = ticks.Children.Count + repeatPoints.Children.Count + 1; var judgementsHit = ticks.Children.Count(t => t.Judgements.Any(j => j.IsHit)) + repeatPoints.Children.Count(t => t.Judgements.Any(j => j.IsHit)); - if (InitialCircle.Judgements.Any(j => j.IsHit)) + if (HeadCircle.Judgements.Any(j => j.IsHit)) judgementsHit++; var hitFraction = (double)judgementsHit / judgementsCount; - if (hitFraction == 1 && InitialCircle.Judgements.Any(j => j.Result == HitResult.Great)) + if (hitFraction == 1 && HeadCircle.Judgements.Any(j => j.Result == HitResult.Great)) AddJudgement(new OsuJudgement { Result = HitResult.Great }); - else if (hitFraction >= 0.5 && InitialCircle.Judgements.Any(j => j.Result >= HitResult.Good)) + else if (hitFraction >= 0.5 && HeadCircle.Judgements.Any(j => j.Result >= HitResult.Good)) AddJudgement(new OsuJudgement { Result = HitResult.Good }); else if (hitFraction > 0) AddJudgement(new OsuJudgement { Result = HitResult.Meh }); @@ -173,7 +159,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables } } - public Drawable ProxiedLayer => InitialCircle.ApproachCircle; + public Drawable ProxiedLayer => HeadCircle.ApproachCircle; public override Vector2 SelectionPoint => ToScreenSpace(Body.Position); public override Quad SelectionQuad => Body.PathDrawQuad; diff --git a/osu.Game.Rulesets.Osu/Objects/Slider.cs b/osu.Game.Rulesets.Osu/Objects/Slider.cs index 79bb14a475..fba016a55e 100644 --- a/osu.Game.Rulesets.Osu/Objects/Slider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Slider.cs @@ -80,6 +80,8 @@ namespace osu.Game.Rulesets.Osu.Objects public double Velocity; public double TickDistance; + public HitCircle HeadCircle; + protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty) { base.ApplyDefaultsToSelf(controlPointInfo, difficulty); @@ -91,6 +93,18 @@ namespace osu.Game.Rulesets.Osu.Objects Velocity = scoringDistance / timingPoint.BeatLength; TickDistance = scoringDistance / difficulty.SliderTickRate; + + HeadCircle = new HitCircle + { + StartTime = StartTime, + Position = StackedPosition, + IndexInCurrentCombo = IndexInCurrentCombo, + ComboColour = ComboColour, + Samples = Samples, + SampleControlPoint = SampleControlPoint + }; + + HeadCircle.ApplyDefaults(controlPointInfo, difficulty); } protected override void CreateNestedHitObjects()