1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:07:25 +08:00
Commit Graph

41164 Commits

Author SHA1 Message Date
Dean Herbert
b809d4c068
Remove delegate overhead from argon health display's animation updates 2024-01-07 14:31:22 +09:00
Dean Herbert
e9289cfbe7
Reduce precision of audio balance adjustments during slider sliding 2024-01-05 02:26:30 +09:00
Dean Herbert
5b55ca6692
Cache legacy skin character glyph lookups to reduce string allocations 2024-01-05 02:26:30 +09:00
Dean Herbert
91bb3f6c57
Cache argon character glyph lookups to reduce string allocations 2024-01-05 01:24:00 +09:00
Dean Herbert
35b9940c4e
Merge pull request #26140 from CaffeeLake/multiplier1x
Fix mod score multiplier rounding to 1.00x with specific mod combinations
2024-01-04 19:26:49 +09:00
Dean Herbert
b12011d501
Avoid rank updates after failing 2024-01-04 17:13:24 +09:00
Dean Herbert
a4dee1a01a
Don't unset Disabled on rank (never actually disabled?) 2024-01-04 17:13:24 +09:00
Dean Herbert
705f25e4b9
Make ScoreProcessor.Rank read-only 2024-01-04 17:13:24 +09:00
Dean Herbert
0bbc27e380
Add a gameplay configuration flag to disable fail animation 2024-01-04 17:13:24 +09:00
Dean Herbert
f0aeeeea96
...in a safer way 2024-01-04 17:13:21 +09:00
Dean Herbert
df99a37254
Fix another realm null inspection 2024-01-04 17:11:40 +09:00
Dean Herbert
0f11743fff
Merge pull request #26379 from wooster0/chat
Make chat command names case-insensitive
2024-01-04 16:17:42 +09:00
wooster0
cf5f0a2bdc Make chat commands case-insensitive
Would be nice if I accidentally have caps lock enabled and write "/HELP" it still works.
2024-01-04 15:06:10 +09:00
wooster0
659118c043 Fix wiki link path inconsistencies
If I access https://osu.ppy.sh/wiki/en/MAIN_PAGE or use any other
capitalization my browser always redirects me to
https://osu.ppy.sh/wiki/en/Main_page so I think Main_page is the
correct capitalization.

This might slightly reduce loading time? No idea though. Probably
negligible if so.
2024-01-04 12:20:51 +09:00
CaffeeLake
c7b0a7ff69
Merge branch 'master' into multiplier1x 2024-01-04 05:04:23 +09:00
CaffeeLake
8482d731c3
Merge branch 'master' into multiplier1x 2024-01-03 20:24:45 +09:00
Bartłomiej Dach
04147eb689
Fix lack of correct default value spec 2024-01-03 11:46:28 +01:00
Bartłomiej Dach
e686a6a1dd
Fix player submission test intermittent failures due to audio playback discrepancy logic kicking in
See https://github.com/ppy/osu/actions/runs/7384457927/job/20087439457#step:5:133.
2024-01-03 09:17:01 +01:00
Dean Herbert
bdfaa4b583
Fix crash when dragging rotation control in editor with both mouse buttons
Closes https://github.com/ppy/osu/issues/26325.
2024-01-03 13:34:50 +09:00
Dean Herbert
18820e60b3
Merge pull request #26337 from bdach/persist-user-status-to-config
Store user online state in config for next launch
2024-01-03 13:21:31 +09:00
Dean Herbert
e4ba7b81b0
Merge pull request #26343 from adryzz/fix-discord-multiplayer-presence
update the current activity when the multiplayer room updates
2024-01-03 13:10:56 +09:00
Dean Herbert
4e7b1e1190
Merge pull request #26333 from bdach/retry-perfect-unobserved-error
Fix possible double score submission when auto-retrying via perfect mod
2024-01-03 13:02:38 +09:00
CaffeeLake
79ef032182
Merge branch 'master' into multiplier1x 2024-01-03 07:40:02 +09:00
Lena
17656e9b9c
update the current activity when the multiplayer room updates 2024-01-02 18:38:25 +01:00
Dean Herbert
16c7c14602
Merge pull request #26332 from bdach/more-score-conversion-fail
Fix standardised score conversion failing for some taiko scores due to overestimating accuracy portion
2024-01-03 01:48:28 +09:00
Bartłomiej Dach
09b2a4e3b4
Fix users blipping online briefly before their online status is known 2024-01-02 14:07:59 +01:00
Bartłomiej Dach
d4e917448d
Fix login panel dropdown forcing user online
It was sort of assuming that the user can't be anything but online when
opening, thus forcing the status to online via the immediately-run value
change callback.
2024-01-02 14:07:04 +01:00
Bartłomiej Dach
f9f03ebc0f
Store user online state in config for next launch
Closes remainder of https://github.com/ppy/osu/issues/12635.
2024-01-02 14:04:40 +01:00
Dean Herbert
05d9aeefbc
Merge pull request #26248 from smoogipoo/slider-tail-judgement
Increase slider tails' worth to 150 points (up from 30)
2024-01-02 20:50:34 +09:00
Bartłomiej Dach
3c5e9ac9a9
Fix possible double score submission when auto-retrying via perfect mod
Closes https://github.com/ppy/osu/issues/26035.

`submitOnFailOrQuit()`, as the name suggests, can be called both when
the player has failed, or when the player screen is being exited from.
Notably, when perfect mod with auto-retry is active, the two happen
almost simultaneously.

This double call exposes a data race in `submitScore()` concerning the
handling of `scoreSubmissionSource`. The race could be experimentally
confirmed by applying the following patch:

diff --git a/osu.Game/Screens/Play/SubmittingPlayer.cs b/osu.Game/Screens/Play/SubmittingPlayer.cs
index 83adf1f960..76dd29bbdb 100644
--- a/osu.Game/Screens/Play/SubmittingPlayer.cs
+++ b/osu.Game/Screens/Play/SubmittingPlayer.cs
@@ -228,6 +228,7 @@ private Task submitScore(Score score)
                 return Task.CompletedTask;
             }

+            Logger.Log($"{nameof(scoreSubmissionSource)} is {(scoreSubmissionSource == null ? "null" : "not null")}");
             if (scoreSubmissionSource != null)
                 return scoreSubmissionSource.Task;

@@ -237,6 +238,7 @@ private Task submitScore(Score score)

             Logger.Log($"Beginning score submission (token:{token.Value})...");

+            Logger.Log($"creating new {nameof(scoreSubmissionSource)}");
             scoreSubmissionSource = new TaskCompletionSource<bool>();
             var request = CreateSubmissionRequest(score, token.Value);

which would result in the following log output:

	[runtime] 2024-01-02 09:54:13 [verbose]: scoreSubmissionSource is null
	[runtime] 2024-01-02 09:54:13 [verbose]: scoreSubmissionSource is null
	[runtime] 2024-01-02 09:54:13 [verbose]: Beginning score submission (token:36780)...
	[runtime] 2024-01-02 09:54:13 [verbose]: creating new scoreSubmissionSource
	[runtime] 2024-01-02 09:54:13 [verbose]: Beginning score submission (token:36780)...
	[runtime] 2024-01-02 09:54:13 [verbose]: creating new scoreSubmissionSource
	[network] 2024-01-02 09:54:13 [verbose]: Performing request osu.Game.Online.Solo.SubmitSoloScoreRequest
	[network] 2024-01-02 09:54:14 [verbose]: Request to https://dev.ppy.sh/api/v2/beatmaps/869310/solo/scores/36780 successfully completed!
	[network] 2024-01-02 09:54:14 [verbose]: SubmitSoloScoreRequest finished with response size of 639 bytes
	[network] 2024-01-02 09:54:14 [verbose]: Performing request osu.Game.Online.Solo.SubmitSoloScoreRequest
	[runtime] 2024-01-02 09:54:14 [verbose]: Score submission completed! (token:36780 id:20247)
	[network] 2024-01-02 09:54:14 [verbose]: Request to https://dev.ppy.sh/api/v2/beatmaps/869310/solo/scores/36780 successfully completed!
	[network] 2024-01-02 09:54:14 [verbose]: SubmitSoloScoreRequest finished with response size of 639 bytes
	[runtime] 2024-01-02 09:54:14 [error]: An unhandled error has occurred.
	[runtime] 2024-01-02 09:54:14 [error]: System.InvalidOperationException: An attempt was made to transition a task to a final state when it had already completed.
	[runtime] 2024-01-02 09:54:14 [error]: at osu.Game.Screens.Play.SubmittingPlayer.<>c__DisplayClass30_0.<submitScore>b__0(MultiplayerScore s) in /home/dachb/Documents/opensource/osu/osu.Game/Screens/Play/SubmittingPlayer.cs:line 250

The intention of the submission logic was to only ever create one
`scoreSubmissionSource`, and then reuse this one if a redundant
submission request was made. However, because of the temporal proximity
of fail and quit in this particular case, combined with the fact that
the calls to `submitScore()` are taking place on TPL threads, means that
there is a read-write data race on `scoreSubmissionSource`, wherein the
source can be actually created twice.

This leads to two concurrent score submission requests, which, upon
completion, attempt to transition only _the second_
`scoreSubmissionSource` to a final state (this is because the API
success/failure request callbacks capture `this`, i.e. the entire
`SubmittingPlayer` instance, rather than the `scoreSubmissionSource`
reference specifically).

To fix, ensure correct synchronisation on the read-write critical
section, which should prevent the `scoreSubmissionSource` from being
created multiple times.
2024-01-02 10:55:52 +01:00
Bartłomiej Dach
b0cfea4916
Fix standardised score conversion failing for some taiko scores due to overestimating accuracy portion
Standardised score conversion would return a negative total score for
https://osu.ppy.sh/scores/taiko/182230346.

The underlying reason for this is that the estimation of the accuracy
portion for a score can be above the actual accuracy portion in the
taiko ruleset.

When calculating the maximum accuracy portion achievable,
`TaikoLegacyScoreSimulator` will include the extra 300 points from
a double hit on a strong hit, per strong hit. However, this double hit
is not factored into accuracy.

Both of the aforementioned facts mean that in taiko

	maximumLegacyAccuracyScore * score.Accuracy

- which normally in other rulesets can be used pretty reliably as the
exact number of points gained from the accuracy portion - is an
estimate in the case of taiko, and an _upper_ estimate at that,
because it implicitly assumes that the user has also hit
`score.Accuracy` percent of all double hits possible in the beatmap. If
this assumption is not upheld, then the user will have earned _less_
points than that from the accuracy portion, which means that the combo
proportion estimate will go below zero.

It is possible that this has happened on other scores before, but did
not result in the total score going negative as the accuracy portion
gained would have counteracted the effect of that due to being larger in
magnitude than the score loss incurred from the negative combo
portion. In the case of the score in question this was not the case due
to very low accuracy _and_ very low max combo.
2024-01-02 10:11:49 +01:00
Dean Herbert
94531807e4
Make slider ends show on results screen again 2024-01-02 17:01:32 +09:00
iilwy
fbedcb29e4
Merge branch 'master' into fix-precision 2024-01-01 10:42:15 -06:00
CaffeeLake
ad4b5f6ded Fix: floating point errors
Signed-off-by: CaffeeLake <PascalCoffeeLake@gmail.com>
2024-01-01 08:32:21 +09:00
Salman Ahmed
34acb435b8
Merge branch 'master' into multiplier1x 2023-12-31 16:48:00 +03:00
Dean Herbert
e10733834b
Merge pull request #26201 from iminlikewithyou/menu-button-tweaks
Adjust menu buttons
2023-12-31 16:58:55 +09:00
Dean Herbert
68b1455257
Merge pull request #26267 from frenzibyte/fix-audio-offset-adjust-control
Fix suggested value in audio offset adjust control being opposite in signs
2023-12-31 16:32:13 +09:00
iminlikewithyou
5ae5d7f92d change floor to round 2023-12-30 23:59:47 -06:00
Salman Ahmed
4dc11c4c48 Update existing code to use helper method 2023-12-31 05:18:07 +03:00
Salman Ahmed
7cfb786b1a Add helper method for properly formatting score multiplier in ModUtils 2023-12-31 05:17:34 +03:00
Gabriel Del Nero
922b6ccb83
Use FontAwesome solid heart icon instead of OsuIcon's 2023-12-31 00:36:55 +01:00
iminlikewithyou
45f6c78314 Merge branch 'master' of https://github.com/ppy/osu into menu-button-tweaks 2023-12-30 12:58:10 -06:00
iminlikewithyou
452f201f06 use margins isntead of moving the position of the sprite 2023-12-30 12:56:38 -06:00
Salman Ahmed
e6fe631625 Fix suggested value in audio offset adjust control being opposite in signs 2023-12-30 21:34:37 +03:00
Salman Ahmed
cc89390ea8 Expose SuggestedOffset bindable for testing purposes 2023-12-30 21:33:03 +03:00
CaffeeLake
bca0600482 Use 0.99x or 1.01x
Signed-off-by: CaffeeLake <PascalCoffeeLake@gmail.com>
2023-12-31 00:47:09 +09:00
Dan Balasescu
807443b648
Add HitResult.SliderTailHit 2023-12-30 10:38:47 +09:00
Dean Herbert
0fa4cd5dfe
Merge pull request #26225 from peppy/new-menu-tips
Add some new menu tips (and reword some others)
2023-12-29 22:27:47 +09:00
Dean Herbert
61c46b78bd
Update MenuTip.cs
Co-authored-by: Salman Ahmed <frenzibyte@gmail.com>
2023-12-29 22:24:16 +09:00
Dean Herbert
9f0fe6c6ca
Fix common typos
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2023-12-29 22:20:29 +09:00