mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
revert slider radius parameter addition
This commit is contained in:
parent
f54a68f6ca
commit
6e883a69d9
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
if (WorkingHitObject.HitObject is Slider slider)
|
||||
{
|
||||
var possibleMovementBounds = OsuHitObjectGenerationUtils.CalculatePossibleMovementBounds(slider, false);
|
||||
var possibleMovementBounds = OsuHitObjectGenerationUtils.CalculatePossibleMovementBounds(slider);
|
||||
|
||||
x = possibleMovementBounds.Width < 0
|
||||
? x
|
||||
|
@ -213,12 +213,11 @@ namespace osu.Game.Rulesets.Osu.Utils
|
||||
/// such that the entire slider is inside the playfield.
|
||||
/// </summary>
|
||||
/// <param name="slider">The <see cref="Slider"/> for which to calculate a movement bounding box.</param>
|
||||
/// <param name="accountForFollowCircleRadius">Whether the movement bounding box should account for the slider's follow circle. Defaults to true.</param>
|
||||
/// <returns>A <see cref="RectangleF"/> which contains all of the possible movements of the slider such that the entire slider is inside the playfield.</returns>
|
||||
/// <remarks>
|
||||
/// If the slider is larger than the playfield, the returned <see cref="RectangleF"/> may have negative width/height.
|
||||
/// </remarks>
|
||||
public static RectangleF CalculatePossibleMovementBounds(Slider slider, bool accountForFollowCircleRadius = true)
|
||||
public static RectangleF CalculatePossibleMovementBounds(Slider slider)
|
||||
{
|
||||
var pathPositions = new List<Vector2>();
|
||||
slider.Path.GetPathToProgress(pathPositions, 0, 1);
|
||||
@ -239,17 +238,14 @@ namespace osu.Game.Rulesets.Osu.Utils
|
||||
maxY = MathF.Max(maxY, pos.Y);
|
||||
}
|
||||
|
||||
if (accountForFollowCircleRadius)
|
||||
{
|
||||
// Take the circle radius into account.
|
||||
float radius = (float)slider.Radius;
|
||||
// Take the circle radius into account.
|
||||
float radius = (float)slider.Radius;
|
||||
|
||||
minX -= radius;
|
||||
minY -= radius;
|
||||
minX -= radius;
|
||||
minY -= radius;
|
||||
|
||||
maxX += radius;
|
||||
maxY += radius;
|
||||
}
|
||||
maxX += radius;
|
||||
maxY += radius;
|
||||
|
||||
// Given the bounding box of the slider (via min/max X/Y),
|
||||
// the amount that the slider can move to the left is minX (with the sign flipped, since positive X is to the right),
|
||||
|
Loading…
Reference in New Issue
Block a user