1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00
Commit Graph

41240 Commits

Author SHA1 Message Date
Salman Ahmed
aebf246f62 Change select all mod buttons to check ValidForSelection instead of directly checking system mods 2024-01-13 09:43:50 +03:00
Salman Ahmed
c476843a83 Mark system mods as invalid for selection in mod select overlay 2024-01-13 09:43:20 +03:00
Dean Herbert
98fe9f32d8
Merge pull request #26484 from bdach/only-validate-playback-rate-when-submitting
Only validate playback rate when in submission context
2024-01-13 12:10:55 +09:00
Bartłomiej Dach
6572fa4378
Only validate playback rate when in submission context
Temporary workaround for https://github.com/ppy/osu/issues/26404.

It appears that some audio files do not behave well with BASS, leading
BASS to report a contradictory state of affairs (i.e. a track that is
in playing state but also not progressing). This appears to be related
to seeking specifically, therefore only enable the validation of
playback rate in the most sensitive contexts, namely when any sort of
score submission is involved.
2024-01-12 14:59:15 +01:00
Dean Herbert
02975b9498
Merge pull request #26471 from bdach/fix-incorrect-difficulty-peppy-stars
Fix incorrect score conversion on selected beatmaps due to incorrect `difficultyPeppyStars` rounding
2024-01-12 22:34:54 +09:00
Bartłomiej Dach
593ca9f84f
Merge pull request #26468 from frenzibyte/fix-skin-parsing
Fix mania skin array decoder not handling malformed entries rigorously
2024-01-12 12:52:02 +01:00
Bartłomiej Dach
b65d3baa8a
Merge branch 'master' into health-less-value-changed 2024-01-11 10:33:08 +01:00
Bartłomiej Dach
7c9adc7ad3
Fix incorrect score conversion on selected beatmaps due to incorrect difficultyPeppyStars rounding
Fixes issue that occurs on *about* 246 beatmaps and was first described
by me on discord:

    https://discord.com/channels/188630481301012481/188630652340404224/1154367700378865715

and then rediscovered again during work on
https://github.com/ppy/osu/pull/26405:

    https://gist.github.com/bdach/414d5289f65b0399fa8f9732245a4f7c#venenog-on-ultmate-end-by-blacky-overdose-631

It so happens that in stable, due to .NET Framework internals, float
math would be performed using x87 registers and opcodes.
.NET (Core) however uses SSE instructions on 32- and 64-bit words.
x87 registers are _80 bits_ wide. Which is notably wider than _both_
float and double. Therefore, on a significant number of beatmaps,
the rounding would not produce correct values due to insufficient
precision.

See following gist for corroboration of the above:

    https://gist.github.com/bdach/dcde58d5a3607b0408faa3aa2b67bf10

Thus, to crudely - but, seemingly accurately, after checking across
all ranked maps - emulate this, use `decimal`, which is slow, but has
bigger precision than `double`. The single known exception beatmap
in whose case this results in an incorrect result is

    https://osu.ppy.sh/beatmapsets/1156087#osu/2625853

which is considered an "acceptable casualty" of sorts.

Doing this requires some fooling of the compiler / runtime (see second
inline comment in new method). To corroborate that this is required,
you can try the following code snippet:

    Console.WriteLine(string.Join(' ', BitConverter.GetBytes(1.3f).Select(x => x.ToString("X2"))));
    Console.WriteLine(string.Join(' ', BitConverter.GetBytes(1.3).Select(x => x.ToString("X2"))));
    Console.WriteLine();

    decimal d1 = (decimal)1.3f;
    decimal d2 = (decimal)1.3;
    decimal d3 = (decimal)(double)1.3f;

    Console.WriteLine(string.Join(' ', decimal.GetBits(d1).SelectMany(BitConverter.GetBytes).Select(x => x.ToString("X2"))));
    Console.WriteLine(string.Join(' ', decimal.GetBits(d2).SelectMany(BitConverter.GetBytes).Select(x => x.ToString("X2"))));
    Console.WriteLine(string.Join(' ', decimal.GetBits(d3).SelectMany(BitConverter.GetBytes).Select(x => x.ToString("X2"))));

which will print

    66 66 A6 3F
    CD CC CC CC CC CC F4 3F

    0D 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00
    0D 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00
    8C 5D 89 FB 3B 76 00 00 00 00 00 00 00 00 0E 00

Note that despite `d1` being converted from a less-precise floating-
-point value than `d2`, it still is represented 100% accurately as
a decimal number.

After applying this change, recomputation of legacy scoring attributes
for *all* rulesets will be required.
2024-01-10 19:30:18 +01:00
Dean Herbert
5d6f767dbd
Reduce excessive Color4 allocations during path colour updates 2024-01-11 00:31:39 +09:00
Salman Ahmed
7ca4d85441 Remove unnecessary AllowThousands flag
The flag is there to match `float.Parse` behaviour, but it's too illogical and unnecessary to have it.
2024-01-10 17:48:48 +03:00
Salman Ahmed
698ae66a49 Fix mania skin array decoder not handling malformed entries rigorously 2024-01-10 17:41:58 +03:00
Dean Herbert
49d13cda6b
Fix failing test by setting health on source of truth 2024-01-10 23:09:43 +09:00
Dean Herbert
91677158a0
Update framework 2024-01-10 22:33:00 +09:00
Dean Herbert
f912a1ba31
Merge branch 'master' into health-less-value-changed 2024-01-10 18:03:34 +09:00
Dean Herbert
a4c9e9f84d
Merge pull request #26405 from bdach/catch-scoring
Adjust catch scoring to match stable score V2
2024-01-10 01:28:56 +09:00
Bartłomiej Dach
8e133ed3ab
Merge pull request #26422 from peppy/allocs-off-the-charts
Preliminary fixes for off-the-charts allocations
2024-01-09 16:06:24 +01:00
Bartłomiej Dach
00a4c055b3
Merge branch 'master' into catch-scoring 2024-01-09 15:49:37 +01:00
Dean Herbert
eec9b6806a
Merge pull request #26434 from bdach/mania-conversion-accuracy
Fix mania score conversion using score V1 accuracy
2024-01-09 23:48:07 +09:00
Bartłomiej Dach
a25223597b
Merge pull request #26456 from peppy/fix-missing-validation
Fix `SettingsToolboxGroup` allocating excessively due to missing cache validation
2024-01-09 14:36:14 +01:00
Bartłomiej Dach
8110c995dd
Merge branch 'master' into allocs-off-the-charts 2024-01-09 14:11:00 +01:00
Bartłomiej Dach
92ba770314
Fix missing wireframe behind percent sign on accuracy counter 2024-01-09 14:00:58 +01:00
Bartłomiej Dach
77bf6e3244
Fix missing wireframe behind "x" sign on combo counter display 2024-01-09 13:59:27 +01:00
Bartłomiej Dach
393d101bc2
Merge branch 'master' into realm-cleanup-overheads-fix 2024-01-09 13:35:22 +01:00
Dean Herbert
4110adc4c0
Fix missing wireframe on argon combo counter 2024-01-09 20:16:28 +09:00
Bartłomiej Dach
a8a70be04a
Reference property via nameof rather than hardcoding 2024-01-09 11:49:42 +01:00
Dean Herbert
8324b75fa4
Merge pull request #26437 from bdach/song-select-logo-crash
Fix crash when clicking osu! logo in song select immediately after exiting
2024-01-09 19:40:19 +09:00
Bartłomiej Dach
cac0b0de6d
Remove unused using directive 2024-01-09 11:38:01 +01:00
Bartłomiej Dach
66b3945cd6
Move current screen check to better place 2024-01-09 10:44:30 +01:00
Dean Herbert
6ac1c799bd
Fix SettingsToolboxGroup allocating excessively due to missing cache validation 2024-01-09 18:34:20 +09:00
Dean Herbert
9c7e555237
Fix initial animation not playing correctly 2024-01-09 18:27:37 +09:00
Dean Herbert
80892f3167
Fix misses not displaying properly 2024-01-09 18:18:11 +09:00
Dean Herbert
b6505ba063
Reduce colour tween overhead and mark other calls of concern 2024-01-09 18:16:54 +09:00
Dean Herbert
12a59eb34c
Remove vertex update overheads 2024-01-09 17:35:01 +09:00
Dean Herbert
b3533d270c
Remove delegate overhead of HealthBarValue/GlowBarValue 2024-01-09 17:20:49 +09:00
Dean Herbert
d83b8dbdaf
Refactor ArgonHealthDisplay to user interpolation and less bindable events 2024-01-09 16:50:27 +09:00
Dean Herbert
1837b31f9b
Remove usage of HealthDisplay.BindValueChanged
Health updates very often when using HP drain. Let's avoid bindable overheads.
2024-01-09 16:38:05 +09:00
Dean Herbert
19d1fff536
Use native query to avoid huge overheads when cleaning up realm files 2024-01-09 15:37:29 +09:00
Dean Herbert
f376bb5ec7
Merge pull request #26441 from Joehuu/fix-wiki-main-page-layout
Fix wiki main page not displaying custom layout
2024-01-09 14:51:49 +09:00
Dean Herbert
765d41faa9
Change second occurrence of debug.assert with early return for fallback safety 2024-01-09 14:07:48 +09:00
Dean Herbert
3f5899dae0
Fix incorrect implementation of wireframe digits 2024-01-09 14:07:48 +09:00
Dean Herbert
6f8a3e15d8
Merge pull request #26382 from peppy/editor-more-frame-stable
Keep editor in frame stable mode when possible
2024-01-09 13:25:03 +09:00
Dean Herbert
743411d7c6
Merge pull request #26440 from bdach/incorrect-combo-proportion
Fix score conversion incorrectly assuming zero combo score in certain cases
2024-01-09 13:21:30 +09:00
Dean Herbert
3cdc3b5786
Merge branch 'master' into fix-wiki-main-page-layout 2024-01-09 13:14:36 +09:00
Dean Herbert
172fe53099
Use better method of ignore case comparison 2024-01-09 13:13:32 +09:00
Dean Herbert
06447e95aa
Merge pull request #26439 from bdach/do-not-attempt-score-upgrade-for-custom-rulesets
Do not attempt to recalculate non-legacy scores or scores set on custom rulesets
2024-01-09 13:08:31 +09:00
Joseph Madamba
d6ba7a9c6e Centralise INDEX_PATH to WikiOverlay 2024-01-08 14:28:16 -08:00
Joseph Madamba
58619f1684 Fix wiki main page not displaying custom layout 2024-01-08 14:16:05 -08:00
Bartłomiej Dach
4f7dcb3a50
Do not attempt to recalculate non-legacy scores or scores set on custom rulesets
Addresses discussions such as https://github.com/ppy/osu/discussions/26407
or https://github.com/ppy/osu/discussions/25914 wherein:

- the game would attempt to convert scores for custom rulesets, which
  makes no sense, especially so when they're not there,

- the game would also "recalculate" lazer scores, but that was never the
  intention or was never supported; the game would just increment the
  score version on those but still include them in the converted tally.
2024-01-08 22:47:13 +01:00
Bartłomiej Dach
aa83b84bb2
Fix Cinema mod being compatible with mods that can force failure
Addresses
https://github.com/ppy/osu/pull/26080#issuecomment-1868833214.
2024-01-08 22:34:41 +01:00
Bartłomiej Dach
67df7b33fb
Add failing test coverage for not attempting to upgrade custom ruleset scores 2024-01-08 22:10:08 +01:00