diff --git a/osu.Game.Rulesets.Catch/Difficulty/Preprocessing/CatchDifficultyHitObject.cs b/osu.Game.Rulesets.Catch/Difficulty/Preprocessing/CatchDifficultyHitObject.cs index 3bcfce3a56..9a7bbb4e9e 100644 --- a/osu.Game.Rulesets.Catch/Difficulty/Preprocessing/CatchDifficultyHitObject.cs +++ b/osu.Game.Rulesets.Catch/Difficulty/Preprocessing/CatchDifficultyHitObject.cs @@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Preprocessing { public class CatchDifficultyHitObject : DifficultyHitObject { - private const float normalized_hitobject_radius = 41.0f; + public const float NORMALIZED_HALF_CATCHER_WIDTH = 41.0f; public new PalpableCatchHitObject BaseObject => (PalpableCatchHitObject)base.BaseObject; @@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Preprocessing : base(hitObject, lastObject, clockRate, objects, index) { // We will scale everything by this factor, so we can assume a uniform CircleSize among beatmaps. - float scalingFactor = normalized_hitobject_radius / halfCatcherWidth; + float scalingFactor = NORMALIZED_HALF_CATCHER_WIDTH / halfCatcherWidth; NormalizedPosition = BaseObject.EffectiveX * scalingFactor; LastNormalizedPosition = LastObject.EffectiveX * scalingFactor; diff --git a/osu.Game.Rulesets.Catch/Difficulty/Skills/Movement.cs b/osu.Game.Rulesets.Catch/Difficulty/Skills/Movement.cs index 559e9dafa0..b69bfb9215 100644 --- a/osu.Game.Rulesets.Catch/Difficulty/Skills/Movement.cs +++ b/osu.Game.Rulesets.Catch/Difficulty/Skills/Movement.cs @@ -12,7 +12,6 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills public class Movement : StrainDecaySkill { private const float absolute_player_positioning_error = 16f; - private const float normalized_hitobject_radius = 41.0f; private const double direction_change_bonus = 21.0; protected override double SkillMultiplier => 1; @@ -55,8 +54,8 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills float playerPosition = Math.Clamp( lastPlayerPosition.Value, - catchCurrent.NormalizedPosition - (normalized_hitobject_radius - absolute_player_positioning_error), - catchCurrent.NormalizedPosition + (normalized_hitobject_radius - absolute_player_positioning_error) + catchCurrent.NormalizedPosition - (CatchDifficultyHitObject.NORMALIZED_HALF_CATCHER_WIDTH - absolute_player_positioning_error), + catchCurrent.NormalizedPosition + (CatchDifficultyHitObject.NORMALIZED_HALF_CATCHER_WIDTH - absolute_player_positioning_error) ); float distanceMoved = playerPosition - lastPlayerPosition.Value; @@ -83,7 +82,8 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills } // Base bonus for every movement, giving some weight to streams. - distanceAddition += 12.5 * Math.Min(Math.Abs(distanceMoved), normalized_hitobject_radius * 2) / (normalized_hitobject_radius * 6) / sqrtStrain; + distanceAddition += 12.5 * Math.Min(Math.Abs(distanceMoved), CatchDifficultyHitObject.NORMALIZED_HALF_CATCHER_WIDTH * 2) / (CatchDifficultyHitObject.NORMALIZED_HALF_CATCHER_WIDTH * 6) + / sqrtStrain; } // Bonus for edge dashes. @@ -102,10 +102,11 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills } // There is an edge case where horizontal back and forth sliders create "buzz" patterns which are repeated "movements" with a distance lower than - // the platter's width but high enough to be considered a movement due to the absolute_player_positioning_error and normalized_hitobject_radius offsets + // the platter's width but high enough to be considered a movement due to the absolute_player_positioning_error and NORMALIZED_HALF_CATCHER_WIDTH offsets // We are detecting this exact scenario. The first back and forth is counted but all subsequent ones are nullified. - // To achieve that, we need to store the exact distances (distance ignoring absolute_player_positioning_error and normalized_hitobject_radius) - if (Math.Abs(exactDistanceMoved) <= HalfCatcherWidth * 2 && exactDistanceMoved == -lastExactDistanceMoved && catchCurrent.StrainTime == lastStrainTime) + // To achieve that, we need to store the exact distances (distance ignoring absolute_player_positioning_error and NORMALIZED_HALF_CATCHER_WIDTH) + if (Math.Abs(exactDistanceMoved) <= CatchDifficultyHitObject.NORMALIZED_HALF_CATCHER_WIDTH * 2 && exactDistanceMoved == -lastExactDistanceMoved + && catchCurrent.StrainTime == lastStrainTime) { if (isInBuzzSection) distanceAddition = 0;