Commit Graph

36090 Commits

Author SHA1 Message Date
862cb1412c Merge pull request #11410 from frenzibyte/user-beatmap-downloading-states
Add change state methods for multiplayer user beatmap availability
2021-01-14 18:42:26 +09:00
8a0b975d71 Fix deadlock scenario when calculating fallback difficulty
The previous code would run a calcaulation for the beatmap's own ruleset
if the current one failed. While this does make sense, with the current
way we use this component (and the implementation flow) it is quite unsafe.

The to the call on `.Result` in the `catch` block, this would 100%
deadlock due to the thread concurrency of the `ThreadedTaskScheduler`
being 1. Even if the nested run could be run inline (it should be), the
task scheduler won't even get to the point of checking whether this is
feasible due to it being saturated by the already running task.

I'm not sure if we still need this fallback lookup logic. After removing
it, it's feasible that 0 stars will be returned during the scenario that
previously caused a deadlock, but I don't necessarily think this is
incorrect. There may be another reason for this needing to exist which
I'm not aware of (diffcalc?) but if that's the case we may want to move
the try-catch handling to the point of usage.

To reproduce the deadlock scenario with 100% success (the repro
instructions in the linked issue aren't that simple and require some
patience and good timing), the main portion of the lookup can be changed
to randomly trigger a nested lookup:

```
if (RNG.NextSingle() > 0.5f)
    return GetAsync(new
DifficultyCacheLookup(key.Beatmap, key.Beatmap.Ruleset,
key.OrderedMods)).Result;
else
    return new StarDifficulty(attributes);
```

After switching beatmap once or twice, pausing debug and viewing the
state of threads should show exactly what is going on.
2021-01-14 18:25:34 +09:00
6eca8eac65 Merge pull request #11479 from smoogipoo/fix-judgement-1-frame-issue
Fix default judgement text mispositioned for one frame
2021-01-14 13:14:50 +09:00
d5878db615 Fix default judgement text mispositioned for one frame 2021-01-14 12:33:33 +09:00
6281c1086a Space out explicit marker in beatmap overlay 2021-01-14 05:41:09 +03:00
abf718242b Make explicit marker font semi-bold 2021-01-14 05:40:43 +03:00
98858d2a9a Merge pull request #11476 from bdach/revert-low-ar-buff
Revert overlooked AR<8 speed buff
2021-01-14 11:13:37 +09:00
95acc457aa Fix stupid mistake
fuck.
2021-01-13 22:35:21 +03:00
560b1e970c Merge branch 'master' into user-beatmap-downloading-states 2021-01-13 22:31:31 +03:00
398f8762b1 Merge pull request #11474 from frenzibyte/rename-downloaded-state
Rename download state `Downloaded` to `Importing`
2021-01-13 20:31:03 +01:00
1ba586a683 Revert overlooked AR<8 speed buff
Pull request #11107 introduced changes in osu! performance calculation,
related to a scaling coefficient applied to the speed and aim skills.
The coefficient in question was dependent on the approach rate of
a map. During a post-merge review of that PR, it was spotted that
the scaling coefficient for speed also had a 10x buff applied for AR<8,
which could reach magnitudes as large as 80% on AR0, which seems quite
exorbitant. This change was not discussed or mentioned anywhere in the
review process.

Revert back to the old multiplier of 0.01 rather than 0.1 for AR<8. The
negative slope through AR0 to 8 is retained in its previous form.
2021-01-13 17:59:29 +01:00
1f12b2bd09 Rename download state Downloaded to Importing 2021-01-13 18:04:53 +03:00
43daa7c7c0 Use Colour2 of orange theme for explicit pill 2021-01-13 17:07:42 +03:00
e275dd02e0 Create static colour properties for now 2021-01-13 17:07:11 +03:00
9d59d784f8 Add Colour{1-4} properties to OverlayColourProvider 2021-01-13 17:06:44 +03:00
268f9d661f Dispose of local config on disposal 2021-01-13 13:00:14 +03:00
a5f99ed8e6 Merge branch 'explicit-beatmap-markers' into explicit-search-control 2021-01-13 12:53:57 +03:00
f827c62081 Add empty online info to test beatmap
This is for `BeatmapSetOverlay` to not eat a null reference trying to access `Beatmap.OnlineInfo`.
2021-01-13 12:27:15 +03:00
7fd55efc43 Add test cases for displaying explicit beatmaps 2021-01-13 12:27:15 +03:00
1502b07ea8 Add explicit pill to playlist items 2021-01-13 12:27:15 +03:00
78631323ba Add explicit pill to beatmap overlay 2021-01-13 12:13:14 +03:00
f6637eec36 Add explicit pill to beatmap panels 2021-01-13 12:13:14 +03:00
ee6baeb57e Add "explicit" marker pill 2021-01-13 12:13:14 +03:00
e8daea91d2 Add online beatmap "explicit content" property 2021-01-13 12:13:14 +03:00
10fd4cf7c9 Merge pull request #11467 from bdach/fix-multiplayer-non-host-crash
Fix non-hosts crashing on load requested
2021-01-13 11:38:59 +09:00
2d3cacca11 Fix non-hosts crashing on load requested
`onLoadRequested()` always released the `readyClickOperation` ongoing
operation, without checking whether it actually needs to/should (it
should only do so if the action initiating the operation was starting
the game by the host). This would crash all other consumers, who already
released the operation when their ready-up operation completed server
side.

To resolve, relax the constraint such that the operation can be ended
multiple times in any order. At the end of the day the thing that
matters is that the operation is done and the ready button is unblocked.
2021-01-13 00:58:53 +01:00
becd52b5d2 Merge pull request #11465 from smoogipoo/fix-taiko-conversion-2 2021-01-12 20:43:37 +01:00
7298adc9d9 Fix non-threadsafe usage of MultiplayerClient.IsConnected 2021-01-12 19:04:16 +09:00
b51b07c3a9 Fix unstable multiplayer room ordering when selection is made 2021-01-12 18:05:29 +09:00
9a22df2b88 Fix BPM multiplier not working in all cases 2021-01-12 17:50:22 +09:00
22a0f99f35 Add failing test 2021-01-12 17:49:21 +09:00
422260797b Revert polling changes to fix participant list display
It turns out this polling was necessary to get extra data that isn't
included in the main listing request. It was removed deemed useless, and
in order to fix the order of rooms changing when selecting a room.
Weirdly, I can't reproduce this happening any more, and on close
inspection of the code can't see how it could happen in the first place.

For now, let's revert this change and iterate from there, if/when the
same issue arises again.

I've discussed avoiding this second poll by potentially including more
data (just `user_id`s?) in the main listing request, but not 100% sure
on this - even if the returned data is minimal it's an extra join
server-side, which could cause performance issues for large numbers of
rooms.
2021-01-12 17:26:00 +09:00
80fa2cf693 Add test coverage 2021-01-12 11:14:05 +03:00
24c1839739 Add global web setting for allowing explicit content 2021-01-12 11:10:25 +03:00
249be461d5 Add "explicit maps" search filter control 2021-01-12 11:09:55 +03:00
0d5fbb15ac Fix up code comments
Default value restated in xmldoc was snipped because it's made redundant
by the initialiser and possibly bound to be outdated at some point.
2021-01-11 20:31:52 +01:00
90fb67b377 Update code in-line with decided direction 2021-01-11 20:52:24 +03:00
dd809df076 Merge pull request #11118 from MiraiSubject/tourney-switching-ui
Add the ability to switch tournaments to the SetupScreen
2021-01-11 16:36:45 +09:00
f65042cf44 Add missing licence headers 2021-01-11 15:47:27 +09:00
c9466426b7 Change field to local variable 2021-01-11 14:45:01 +09:00
7a7c583ded Move setup screen classes out of single file and into their own namespace 2021-01-11 14:44:07 +09:00
bd627534b7 Use disabled state instead of hiding button 2021-01-11 14:38:51 +09:00
ba3a7a0501 Clean up code 2021-01-11 14:38:42 +09:00
49057e8cbc Cache TournamentStorage explicitly for better safety 2021-01-11 14:38:42 +09:00
2286e3679f Downloaded -> Importing 2021-01-11 08:21:07 +03:00
a8dfa5e2a9 Rename typo'd method 2021-01-11 08:04:00 +03:00
e99310b59c Add JsonConstructor attribute 2021-01-11 08:02:57 +03:00
2abeda5e0f Merge pull request #11447 from bdach/fix-play-button-crashes
Fix track previews crashing on completion
2021-01-11 03:10:18 +09:00
d2ca6da0fd Remove unused constant 2021-01-11 01:56:09 +09:00
bd37723788 Expose as IBindable for added safety 2021-01-11 01:55:54 +09:00