osu/osu.Game/Database
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
..
BeatmapExporter.cs change .osz2 to .olz (osu lazer zip) 2023-07-12 15:04:06 +02:00
BeatmapLookupCache.cs
EmptyRealmSet.cs Bring realm library up-to-date 2023-07-06 13:37:43 +09:00
ICanAcceptFiles.cs
IHasFiles.cs
IHasGuidPrimaryKey.cs
IHasNamedFiles.cs
IHasOnlineID.cs
IHasPrimaryKey.cs
IHasRealmFiles.cs Remove IScoreInfo : IHasNamedFiles inheritance 2023-10-26 14:58:33 +02:00
IModelDownloader.cs
IModelFileManager.cs
IModelImporter.cs
IModelManager.cs
ImportParameters.cs Fix skin editor freezing game if opened during active gameplay 2023-10-27 14:34:30 +02:00
ImportProgressNotification.cs
ImportTask.cs Bring back disposal of stream after copy-out to MemoryStream 2023-09-14 19:36:35 +02:00
INamedFile.cs
INamedFileInfo.cs
INamedFileUsage.cs
IPostNotifications.cs
ISoftDelete.cs
LegacyArchiveExporter.cs Move all conversion code to LegacyBeatmapExporter 2023-07-13 00:20:01 +02:00
LegacyBeatmapExporter.cs Fix incorrect legacy conversion when B-splines are used 2023-11-20 15:08:58 +09:00
LegacyBeatmapImporter.cs Fix legacy beatmap importer not always handling nested paths correctly 2023-10-03 16:01:17 +09:00
LegacyCollectionImporter.cs
LegacyExporter.cs
LegacyImportManager.cs Extract common method for determining stable import usability of directory 2023-12-15 15:42:19 +01:00
LegacyModelImporter.cs
LegacyScoreExporter.cs
LegacyScoreImporter.cs
LegacySkinExporter.cs
LegacySkinImporter.cs
Live.cs
MemoryCachingComponent.cs
MissingBeatmapNotification.cs Fix notification text sets overwriting each other 2023-09-19 11:12:58 +02:00
ModelDownloader.cs
ModelManager.cs Add helper method for safer realm Find<T> 2023-08-16 15:37:09 +09:00
OnlineLookupCache.cs
RealmAccess.cs Bump version number 2023-12-13 17:38:59 +09:00
RealmArchiveModelImporter.cs Fix skin editor freezing game if opened during active gameplay 2023-10-27 14:34:30 +02:00
RealmExtensions.cs Fill out xmldoc and adjust inline commentary 2023-08-16 09:40:46 +02:00
RealmFileStore.cs
RealmLive.cs Add helper method for safer realm Find<T> 2023-08-16 15:37:09 +09:00
RealmLiveUnmanaged.cs
RealmObjectExtensions.cs Remove outdated xmldoc 2023-07-06 22:01:02 +02:00
StandardisedScoreMigrationTools.cs Fix osu! standardised score conversion sometimes exceeding bounds 2023-12-18 22:05:19 +01:00
TooManyDownloadsNotification.cs
UserLookupCache.cs