1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 03:07:26 +08:00
Commit Graph

969 Commits

Author SHA1 Message Date
Dean Herbert
4d4d69521f
Merge pull request #27114 from EVAST9919/judgements-rework
Cache created judgement in `HitObject`
2024-02-18 18:07:58 +08:00
Dean Herbert
9655e8c48a
Adjust xmldoc slightly 2024-02-18 17:54:29 +08:00
Andrei Zavatski
22f5a66c02 Reduce allocations during beatmap selection 2024-02-17 15:46:38 +03:00
Andrei Zavatski
060b01eee8 Make CreateJudgement public again and add remarks 2024-02-16 20:24:02 +03:00
Andrei Zavatski
c500264306 Cache created judgement in HitObject 2024-02-09 23:20:31 +03:00
Dan Balasescu
c18cd65081
Merge pull request #26694 from chandler14362/hit-object-result-allocations
Avoid closure allocations when applying hit object results
2024-02-06 17:49:26 +09:00
Bartłomiej Dach
f65449375e
Merge branch 'master' into scrolling-alloc 2024-02-05 19:59:47 +01:00
Bartłomiej Dach
39fe078984
Merge branch 'master' into hit-object-result-allocations 2024-02-05 13:24:10 +01:00
Bartłomiej Dach
2976f225e0
Improve xmldoc of state param 2024-02-05 13:22:58 +01:00
Bartłomiej Dach
efe6bb25b1
Refactor result application around again to remove requirement for fields
Co-authored-by: Dean Herbert <pe@ppy.sh>
2024-02-05 13:21:01 +01:00
Andrei Zavatski
4aa27482a9 Use SlimReadOnlyDictionaryWrapper for AliveEntries 2024-02-03 19:54:08 +03:00
Dan Balasescu
b44f77cee1
Update R# + fix inspections 2024-02-02 21:00:28 +09:00
Dan Balasescu
0642d74014
Expose as ReadOnlyDictionary 2024-01-31 22:52:57 +09:00
Andrei Zavatski
3aefc91967 Make AliveDrawableMap public 2024-01-31 07:54:07 +03:00
Dean Herbert
de32e7815b
Clean up DrawableHitObject events on Dispose
This is just general safeties to avoid cases where
components don't correctly unbind events.
2024-01-29 15:28:20 +09:00
Dean Herbert
347e88f597
Add note about using static callback 2024-01-26 16:21:48 +09:00
Chandler Stowell
93bd3ce5ae update DrawableHitCircle.ApplyResult to pass this to its callback 2024-01-25 11:25:41 -05:00
Chandler Stowell
d2775680e6 use stack to pass action state when applying hit results
this removes closure allocations
2024-01-24 13:13:45 -05:00
Dean Herbert
1999e772f6
Fix FollowPointConnection pool filling up when follow points are hidden
Closes https://github.com/ppy/osu/issues/26642.

I think this applied to all pooling cases here.
2024-01-21 10:31:27 +09: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
e9289cfbe7
Reduce precision of audio balance adjustments during slider sliding 2024-01-05 02:26:30 +09:00
OliBomby
ec578e1d9f fix near-zero length sliders n stuff being placeable 2023-12-19 21:20:21 +01:00
Dan Balasescu
10e16e4b04
Fix handling of combo offset without new combo, and incorrect lazer tests 2023-11-24 09:46:06 +09:00
Dan Balasescu
7bc2d6e6cd
Merge branch 'master' into fix-combo-handling 2023-11-23 16:22:01 +09:00
Dan Balasescu
7998204cfe
Fix combo/combo colouring issues around spinners 2023-11-23 13:54:05 +09:00
Dan Balasescu
30309cdf11
Merge pull request #25415 from Poyo-SSB-forks/unify-ur
Change unstable rate calculation to account for rate-change mods
2023-11-23 09:53:28 +09:00
Dan Balasescu
cb4568c4a1
Fix first object after break not starting a new combo 2023-11-22 17:22:48 +09:00
Dean Herbert
04640b6fb0
Improve commenting around IHasCombo interfaces
Following discusion with smoogi IRL.
2023-11-22 10:44:29 +09:00
Poyo
0cf925dadf Use better fallback
Seems better to use the rate from a non-gameplay clock than to arbitrarily apply 1.
2023-11-21 15:18:04 -08:00
Dean Herbert
4b2d8aa6a6
Add ToString on PathType for better test output 2023-11-21 15:38:12 +09:00
Dean Herbert
3d094f84ad
Fix incorrect parsing of BSpline curve types 2023-11-21 15:38:12 +09:00
Bartłomiej Dach
8e39dbbff1
Adjust casing of curve type menu items
The "Perfect curve" one in particular... fixes test failures, as some
tests were relying on this particular casing. But the new version feels
more correct anyway, so it's whatever.
2023-11-20 15:42:55 +09:00
Bartłomiej Dach
6d7d826b8b
Fix incorrect legacy conversion when B-splines are used 2023-11-20 15:08:58 +09:00
Bartłomiej Dach
80a3225bb2
Use static BEZIER instead of allocating new every time 2023-11-20 13:35:07 +09:00
Bartłomiej Dach
487326a4c7
Remove pattern matching syntax usage in switch
Also throw on unknown types.
2023-11-20 13:34:01 +09:00
Bartłomiej Dach
7820c8ce4d
Decrease redundancy of equality implementations 2023-11-20 12:28:20 +09:00
Bartłomiej Dach
25c1a90047
Change switchexpr to standard switch statement 2023-11-20 12:26:45 +09:00
Bartłomiej Dach
577cb9994c
Move static instances / construction methods closer together 2023-11-20 12:26:43 +09:00
Poyo
d9cd546377 Use rate fallback in DrawableHitObject 2023-11-18 12:09:37 -08:00
Poyo
a73c870712 Allow GameplayRate to be nullable and assert before use 2023-11-15 17:00:35 -08:00
cs
520642975b Fix control point hover text and context menu 2023-11-15 07:45:09 +01:00
Poyo
f5e1734de9 Use soft-cast to access IGameplayClock 2023-11-14 13:51:55 -08:00
cs
fa976a5aa0 Fix code style/quality issues 2023-11-13 08:25:27 +01:00
Poyo
f794d4dc83 Allow gameplayClock to be null 2023-11-12 13:29:40 -08:00
Poyo
e67725f5d6 Use IGameplayClock for rate 2023-11-12 12:14:19 -08:00
cs
54b8244a18 CI Fixup 2023-11-11 15:02:06 +01:00
cs
3f85aa79c5 Add free-hand drawing of sliders to the editor 2023-11-11 13:33:25 +01:00
Thomas Müller-Höhne
926636cc03 Generalize Bezier curves to BSplines of Nth degree 2023-11-11 13:32:53 +01:00
Poyo
064857c40b Calculate unstable rate using rate-adjusted offsets 2023-11-10 19:57:44 -08:00
Dean Herbert
34505b3933
Merge pull request #25185 from bdach/minimum-sample-volume 2023-10-24 22:04:43 +09:00