Skip to content

Fix relax mod not considering full follow area radius when automatically holding sliders #26041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Osu/Mods/OsuModRelax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void Update(Playfield playfield)
if (!slider.HeadCircle.IsHit)
handleHitCircle(slider.HeadCircle);

requiresHold |= slider.Ball.IsHovered || h.IsHovered;
requiresHold |= slider.SliderInputManager.IsMouseInFollowArea(true);
break;

case DrawableSpinner spinner:
Expand Down
8 changes: 4 additions & 4 deletions osu.Game.Rulesets.Osu/Objects/Drawables/SliderInputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ protected override bool OnMouseMove(MouseMoveEvent e)
protected override void Update()
{
base.Update();
updateTracking(isMouseInFollowArea(Tracking));
updateTracking(IsMouseInFollowArea(Tracking));
}

public void PostProcessHeadJudgement(DrawableSliderHead head)
{
if (!head.Judged || !head.Result.IsHit)
return;

if (!isMouseInFollowArea(true))
if (!IsMouseInFollowArea(true))
return;

Debug.Assert(screenSpaceMousePosition != null);
Expand Down Expand Up @@ -129,7 +129,7 @@ public void PostProcessHeadJudgement(DrawableSliderHead head)
// If all ticks were hit so far, enable tracking the full extent.
// If any ticks were missed, assume tracking would've broken at some point, and should only activate if the cursor is within the slider ball.
// For the second case, this may be the last chance we have to enable tracking before other objects get judged, otherwise the same would normally happen via Update().
updateTracking(allTicksInRange || isMouseInFollowArea(false));
updateTracking(allTicksInRange || IsMouseInFollowArea(false));
}

public void TryJudgeNestedObject(DrawableOsuHitObject nestedObject, double timeOffset)
Expand Down Expand Up @@ -174,7 +174,7 @@ public void TryJudgeNestedObject(DrawableOsuHitObject nestedObject, double timeO
/// Whether the mouse is currently in the follow area.
/// </summary>
/// <param name="expanded">Whether to test against the maximum area of the follow circle.</param>
private bool isMouseInFollowArea(bool expanded)
public bool IsMouseInFollowArea(bool expanded)
{
if (screenSpaceMousePosition is not Vector2 pos)
return false;
Expand Down