Skip to content
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

Refactor GetMaxCombo #227

Merged
merged 3 commits into from
Oct 27, 2024
Merged

Refactor GetMaxCombo #227

merged 3 commits into from
Oct 27, 2024

Conversation

MaxOhn
Copy link
Contributor

@MaxOhn MaxOhn commented Oct 23, 2024

Arguably for mania it should stay on zero but I'd say this should be fine.

Notably, if max combo calculation in lazer ever differs from stable for any mode, this will require better handling. As far as I know they currently coincide.

@MaxOhn
Copy link
Contributor Author

MaxOhn commented Oct 23, 2024

After checking some mania leaderboards it seems that max combo does differ between lazer and stable. If this PR goes through as-is, that means the shown value will be incorrect when intending to calculate stable attributes. The actual calculated attributes won't be affected though considering that their calculation in mania (currently) ignores combo.

Regardless, the shown value will be closer to the actual combo than just 0 😄 An option to distinguish lazer from stable attribute calculation as warranted in #226 could help fixing this entirely.

@minisbett
Copy link
Contributor

minisbett commented Oct 24, 2024

In my opinion, the correct implementation here would be re-adding the GetMaxCombo method as a virtual method with a default implementation of calling beatmap.GetMaxCombo(). Then, for Mania it can be overriden to include the differences between stable and lazer.

This was a refactor I wanted to do some days ago but I got caught up in other stuff and haven't found time.

Update: I found out CL does not exist in Mania. Therefore I believe it is best to just have all modes do exactly this. But I believe it might be better to follow what stan said here

@MaxOhn
Copy link
Contributor Author

MaxOhn commented Oct 25, 2024

I removed the method entirely now 👌

Given that the max combo is in somewhat of a limbo until the stable-lazer difference can be handled properly in osu-tools, maybe it's better to hold off on this?

@minisbett
Copy link
Contributor

I removed the method entirely now 👌

Given that the max combo is in somewhat of a limbo until the stable-lazer difference can be handled properly in osu-tools, maybe it's better to hold off on this?

I don't think it will be handled differently since there isn't really a need to. Mania has that combo difference as (afaik?) the only ruleset, and combo does not matter in PP there so its fine to go with Lazer combo, it's pretty much just display.

Copy link
Contributor

@minisbett minisbett left a comment

Choose a reason for hiding this comment

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

Replacing the direct calculation of maximum combo with the IBeatmap.GetMaxCombo() call seems to match 1:1 (tested) (except for disregardable differences between stable and lazer on mania), therefore this seems like a good change.

Take my meaningless approval.

Copy link
Member

@stanriders stanriders left a comment

Choose a reason for hiding this comment

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

I'd say we'd want to rely on lazer's methods as much as possible anyway

@stanriders stanriders merged commit ef80ec6 into ppy:master Oct 27, 2024
3 checks passed
@MaxOhn MaxOhn deleted the refactor-max-combo branch October 28, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants