Skip to content

Fix "spins per minute" shows up early (fix #31173) #32796

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
Apr 14, 2025

Conversation

Rudicito
Copy link
Contributor

@Rudicito Rudicito commented Apr 13, 2025

Fix #31173

Make isSpinnableTime public in SpinnerRotationTracker and use it to set Tracking in OsuModSpunOut.

Tracking was previously set to true, causing the "spins per minute" to appear immediately when the spinner appeared.

Before:

before.mp4

After:

after.mp4

Sorry for the low framerate of the videos.
I hope the PR is okay.

Make isSpinnableTime public in SpinnerRotationTracker and use it to set Tracking in OsuModSpunOut.

Tracking was previously set to true, causing the "spins per minute" to appear immediately when the spinner appeared.
Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes logical sense to me.

@smoogipoo smoogipoo merged commit 5f5be13 into ppy:master Apr 14, 2025
8 of 10 checks passed
@bdach
Copy link
Collaborator

bdach commented Apr 14, 2025

It doesn't to me.

The alpha of the spm stuff is steered by TimeStarted on the judgement result:

if (drawableSpinner.Result?.TimeStarted is double startTime)
spmContainer.Alpha = (float)Math.Clamp((Clock.CurrentTime - startTime) / drawableSpinner.HitObject.TimeFadeIn, 0, 1);

which is documented as:

/// <summary>
/// Time instant at which the spin was started (the first user input which caused an increase in spin).
/// </summary>
public double? TimeStarted;

and set by:

if (Result.TimeStarted == null && RotationTracker.Tracking)
Result.TimeStarted = Time.Current;

If Tracking can be true before the spinner actually becomes spinnable, then isn't that an issue? What stops this issue from happening outside of the Spun Out mod context?

@bdach
Copy link
Collaborator

bdach commented Apr 14, 2025

I guess the answer to my question is this:

if (HandleUserInput)
{
bool isValidSpinningTime = Time.Current >= HitObject.StartTime && Time.Current <= HitObject.EndTime;
RotationTracker.Tracking = !Result.HasResult
&& correctButtonPressed()
&& isValidSpinningTime;
}

but like I dunno. This feels like a very shallow fix.

At least if this is to remain this way the "valid spinning time" checks should be consistent and they're even not. There's like a difference in the equality operators used in both.

@Rudicito Rudicito deleted the fix-spin-per-minute-showing-early branch April 14, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Spun Out" make spinner's "spins per minute" text shows up early
3 participants