-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix crash when resetting offset after a play with no hit events #30620
Conversation
Coming from #30573 (comment), I think it would be a better fix if the beatmap offset control makes sure the graph won't actually possibly receive less than 10 hit events and display the "play is too short" message. Right now it doesn't do so for the specific case I mentioned in the comment: A slider at the beginning of a beatmap with such a slow velocity that makes it generate more than 10 ticks, and is played with classic mod enabled. Instead, it shows this broken graph: i.e.: diff --git a/osu.Game/Screens/Play/PlayerSettings/BeatmapOffsetControl.cs b/osu.Game/Screens/Play/PlayerSettings/BeatmapOffsetControl.cs
index f312fb0ec5..2573c95f12 100644
--- a/osu.Game/Screens/Play/PlayerSettings/BeatmapOffsetControl.cs
+++ b/osu.Game/Screens/Play/PlayerSettings/BeatmapOffsetControl.cs
@@ -182,7 +182,7 @@ private void scoreChanged(ValueChangedEvent<ScoreInfo?> score)
if (score.NewValue.Mods.Any(m => !m.UserPlayable || m is IHasNoTimedInputs))
return;
- var hitEvents = score.NewValue.HitEvents;
+ var hitEvents = score.NewValue.HitEvents.Where(e => !(e.HitObject.HitWindows is HitWindows.EmptyHitWindows) && e.Result.IsBasic() && e.Result.IsHit()).ToList();
if (!(hitEvents.CalculateAverageHitError() is double average))
return; |
Sure, that seems like a valid fix in addition to what is here, not replacing it. |
Looking into this further, I believe the extra fix is out of scope and should be handled separately. It's weird and I don't want to spend the time on it right now, as I'll need to re-learn hitobjects and stuff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the circumstances of this are actually understood, I'm fine merging this (but will look into follow-up changes related to the conversation above).
…t enough timed hits Intended to address concerns raised in ppy#30620 (comment).
Closes #30573.