-
-
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 mod score multiplier rounding to 1.00x with specific mod combinations #26140
Conversation
Classic mod multiplier: 0.96x I'm not sure this solution is correct to be honest. The combination of mods does decrease the score multiplier, even if by just a bit. I'd take displaying 0.99x over this, and changing the logic to always round the textual displayed value away from 1.0x (so 1.0x is only displayed to the user if the multiplier is literally exactly 1.0x). @ppy/team-client opinions please. This is also an issue on the mod screen by the way and this PR doesn't fix that part. |
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.
needs work as per above (at least to fix the mod select screen too).
Yeah I'd imagine it always flooring to the lower rounded decimal. |
So in short, I'd say:
Seems simpler than just handling the values around 1.00x in a special manner? |
This is a little off topic, In the Mod Select overlay, lower multiplier are green and higher multiplier are red. |
The footer will be fixed to match when the entirety of song select is redesigned. Please ignore for the time being. |
55d66dc
to
e2906a4
Compare
Changed to display 0.99x or 1.01x when the value is close to 1.00x and is not an error (such as 0.9984x). |
Signed-off-by: CaffeeLake <PascalCoffeeLake@gmail.com>
e2906a4
to
bca0600
Compare
I've refactored this PR to add a helper method as proposed above and used it, instead of sprinkling the same code everywhere. I've also made the helper method use mathematical formulas as proposed above as well. |
Will wait for @bdach for a second review on this. |
Signed-off-by: CaffeeLake <PascalCoffeeLake@gmail.com>
|
Signed-off-by: CaffeeLake <PascalCoffeeLake@gmail.com>
Could you please add new tests to cover the failure scenario you fixed? |
Added tests to cover floating point errors . |
@CaffeeLake for future reference, please don't merge master in multiple times. We'll do that when we're ready to handle your PR. |
Fix mod score multiplier rounding to 1.00x with specific mod combinations.
Before
After