1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00
osu-lazer/osu.Game/Scoring/Legacy
Bartłomiej Dach 017003deea
Fix osu! standardised score conversion sometimes exceeding bounds
Co-authored-by: Zyf <zyfarok@gmail.com>

Closes https://github.com/ppy/osu/issues/25860

Users reported that some stable scores would convert to large negative
total scores in lazer after the introduction of combo exponent. Those
large negative total scores were actually mangled NaNs.

The root cause of this was the following calculation going below zero
unexpectedly:

	8e8d9b2cd9/osu.Game/Database/StandardisedScoreMigrationTools.cs (L323)

which then propagates negative numbers onward until

	8e8d9b2cd9/osu.Game/Database/StandardisedScoreMigrationTools.cs (L337)

which yields a NaN due to attempting to take the square root of a
negative number.

To fix, clamp `comboPortionInScoreV1` to sane limits: to
`comboPortionFromLongestComboInScoreV1` from below, and to
`maximumAchievableComboPortionInScoreV1` from above. This is a less
direct fix than perhaps imagined, but it seems like a better one as it
will also affect the calculation of both the lower and the upper
estimate of the score.
2023-12-18 22:05:19 +01:00
..
DatabasedLegacyScoreDecoder.cs Revert "Merge pull request #22741 from cdwcgt/do-not-fetch-deletePending" 2023-03-16 19:48:36 +09:00
LegacyReplaySoloScoreInfo.cs Encode/decode new OnlineID into/from LegacyReplaySoloScoreInfo 2023-10-16 11:20:02 +02:00
LegacyScoreDecoder.cs Encode/decode new OnlineID into/from LegacyReplaySoloScoreInfo 2023-10-16 11:20:02 +02:00
LegacyScoreEncoder.cs Fix osu! standardised score conversion sometimes exceeding bounds 2023-12-18 22:05:19 +01:00
ScoreInfoExtensions.cs Fix classic scoring overflowing in osu! ruleset due to integer multiplication overflow 2023-11-23 08:16:25 +09:00