From 7d3380db665fb938c5c9c6992d76eec07a5fa6e7 Mon Sep 17 00:00:00 2001 From: Hanamuke Date: Thu, 13 Sep 2018 17:01:33 +0200 Subject: [PATCH] Fixed comment. Created static CatchArea.GetCatcheWidth method --- osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs | 5 +---- osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs | 6 +++--- osu.Game.Rulesets.Catch/UI/CatcherArea.cs | 5 +++++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs index 34bddf425c..d4be6564ca 100644 --- a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs +++ b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs @@ -74,9 +74,6 @@ namespace osu.Game.Rulesets.Catch.Beatmaps private void initialiseHyperDash(List objects) { - if (objects.Count == 0) - return; - List objectWithDroplets = new List(); foreach (var currentObject in objects) @@ -89,7 +86,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps objectWithDroplets.Add((CatchHitObject)currentJuiceElement); } - double halfCatcherWidth = CatcherArea.CATCHER_SIZE * objectWithDroplets[0].Scale / CatchPlayfield.BASE_WIDTH / 2; + double halfCatcherWidth = CatcherArea.GetCatcherSize(Beatmap.BeatmapInfo.BaseDifficulty) / 2; int lastDirection = 0; double lastExcess = halfCatcherWidth; diff --git a/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs b/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs index 5eae4de9e6..773bf576dd 100644 --- a/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs +++ b/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs @@ -27,9 +27,9 @@ namespace osu.Game.Rulesets.Catch.Objects public int ComboIndex { get; set; } /// - /// The difference between the distance of the next object - /// and the distance that would have triggered hyper dashing. - /// A value close to 0 indicates a difficult jump (for SR calculation) + /// Difference between the distance to the next object + /// and the distance that would have triggered a hyper dash. + /// A value close to 0 indicates a difficult jump (for difficulty calculation). /// public float DistanceToHyperDash { get; set; } diff --git a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs index 9460512a8d..1662246b62 100644 --- a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs +++ b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs @@ -107,6 +107,11 @@ namespace osu.Game.Rulesets.Catch.UI public bool AttemptCatch(CatchHitObject obj) => MovableCatcher.AttemptCatch(obj); + public static float GetCatcherSize(BeatmapDifficulty difficulty) + { + return (CATCHER_SIZE / CatchPlayfield.BASE_WIDTH) * (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5); + } + public class Catcher : Container, IKeyBindingHandler { ///