Commit Graph

4015 Commits

Author SHA1 Message Date
eaef27595c Also mark UnknownMod as not user-playable 2022-03-10 15:33:50 +09:00
c36badab4b Add per-ruleset score multipliers for classic scoring 2022-03-10 10:26:09 +09:00
94ff6a338f Merge branch 'master' into scoreprocessor-rework 2022-03-09 23:04:18 +09:00
02f44d7061 Merge branch 'master' into fix-mod-conversion-exceptions 2022-03-09 18:07:42 +09:00
0267aed846 Change ToMod to return an UnknownMod rather than throw if a mod isn't available
As seen by this kind of crash, having the `.ToMod` method throw can be
very problematic and also hidden (as it is used inside of models in
places where exceptions are not expected to occur).

Given there are tens of usages of this method, returning a placeholder
mod seems like a better idea than outright throwing.

```
 An unhandled has occurred.
 System.InvalidOperationException:
There is no mod in the ruleset (osu) matching the acronym AS.
 at osu.Game.Online.API.APIMod.ToMod(Ruleset ruleset) in /Users/dean/Projects/osu/osu.Game/Online/API/APIMod.cs:line 54
 at osu.Game.Scoring.ScoreInfo.<get_Mods>b__117_0(APIMod m) in /Users/dean/Projects/osu/osu.Game/Scoring/ScoreInfo.cs:line 193
 at System.Linq.Enumerable.SelectArrayIterator`2.ToArray()
 at osu.Game.Scoring.ScoreInfo.get_Mods() in /Users/dean/Projects/osu/osu.Game/Scoring/ScoreInfo.cs:line 193
 at osu.Game.Screens.Select.Leaderboards.BeatmapLeaderboard.<>c.<subscribeToLocalScores>b__40_2(ScoreInfo s) in /Users/dean/Projects/osu/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs:line 199
 at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
 at osu.Game.Database.RealmObjectExtensions.Detach[T](IEnumerable`1 items) in /Users/dean/Projects/osu/osu.Game/Database/RealmObjectExtensions.cs:line 180
 at osu.Game.Screens.Select.Leaderboards.BeatmapLeaderboard.<>c__DisplayClass40_0.<subscribeToLocalScores>g__localScoresChanged|1(IRealmCollection`1 sender, ChangeSet changes, Exception exception) in /Users/dean/Projects/osu/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs:line
209
 at Realms.RealmCollectionBase`1.Realms.INotifiable<Realms.NotifiableObjectHandleBase.CollectionChangeSet>.NotifyCallbacks(Nullable`1 changes, Nullable`1 exception)
 at Realms.NotifiableObjectHandleBase.NotifyObjectChanged(IntPtr managedHandle, IntPtr changes, IntPtr exception)
```
2022-03-09 17:57:55 +09:00
8bb07f83cd Merge pull request #17054 from hlysine/mod-adaptive-speed
Implement Adaptive Speed mod
2022-03-09 17:56:34 +09:00
6fd8b4d891 Safeguard method against invalid invocation 2022-03-08 22:30:44 +09:00
f1c40bd9ed Rework GetScore() method signatures + implementations
Rename legacy-facing overload to mention as much
2022-03-08 22:30:44 +09:00
a8e99f1a95 Calculate classic score using total basic hitobject count 2022-03-08 21:49:41 +09:00
5b6b8d1fa9 Remove GetStandardisedScore() proxy method 2022-03-08 21:49:41 +09:00
6654977a7b Add GetScore() overload with total hitobject count 2022-03-08 21:49:41 +09:00
2c382bd1d9 Rename GetImmediateScore() as overload of GetScore() 2022-03-08 21:49:40 +09:00
a352a140bc Merge pull request #17157 from peppy/fix-statistics-json-serialisation
Fix incorrect serialisation of submitted scores
2022-03-08 20:20:31 +09:00
a172fc6cb8 Add IsBasic() and IsTick() extensions on HitResult 2022-03-08 18:19:12 +09:00
589a40ca2d Add EnumMember naming to HitResult to allow for correct json serialisation 2022-03-08 17:58:37 +09:00
8b8b54b58f Scale rate adjustments based on hit timing consistency and tweak some related numbers 2022-03-05 21:48:57 +08:00
76d257fbe4 Merge branch 'master' into mod-adaptive-speed 2022-03-04 15:16:37 +08:00
f72c9a1f41 Cap speed change per hit and apply a speed decrease on miss 2022-03-04 11:48:48 +08:00
b66af7edf4 Rename approximatedRates to ratesForRewinding and update xmldoc 2022-03-04 11:03:57 +08:00
fcefd3c725 Fix slightly wrong references in xmldocs 2022-03-03 17:39:55 +01:00
3797871aa0 Add extended documentation of adaptive speed mod machinations 2022-03-03 17:25:49 +01:00
ffaf5b729f Move and reword docs of allowable rate range constants 2022-03-03 17:07:43 +01:00
464be6e64c Only call IUpdatableByPlayfield.Update if the playfield isn't nested 2022-03-03 14:37:39 +08:00
4ce2044e4c Reorder members 2022-03-03 13:09:41 +08:00
9c2aa51194 Rename applyPitchAdjustment to adjustPitchChanged 2022-03-03 13:07:30 +08:00
ae71dcceeb Convert comments to xmldoc 2022-03-03 13:03:53 +08:00
09254407fe Interpolate speed change using IUpdatableByPlayfield 2022-03-03 12:09:36 +08:00
51258dbab4 Use binary search in ApplyToBeatmap 2022-03-03 11:21:20 +08:00
95a40c5dc5 Remove pointless comment 2022-03-03 10:43:30 +08:00
ff7f65de27 Extract duplicated conditionals 2022-03-03 10:43:04 +08:00
55737226a3 Use Enumerable.Repeat 2022-03-03 10:18:36 +08:00
d335a2229f Tweak average_count 2022-03-02 21:07:57 +08:00
17bc714297 Allow the mod to properly react to nested hit objects 2022-03-02 20:48:57 +08:00
6caecf79a0 Use smooth speed change 2022-03-02 20:08:05 +08:00
c6934b4bce Improve adaptive speed algorithm and add rewind support 2022-03-02 10:35:03 +08:00
783f43ccfb Add initial rate setting 2022-03-02 09:57:52 +08:00
c9b205afeb Add adaptive speed mod 2022-03-02 09:57:52 +08:00
7215f3f66b Fix CalculateAverageHitError throwing if there are zero HitEvents 2022-03-01 18:44:15 +09:00
159db38f8a Add missing xmldoc 2022-02-28 19:14:43 +09:00
a41e1c80f1 Show hit error on results screen
Leading up to implementation of "local offset", this feels like a good
thing to have visible first and foremost.
2022-02-28 19:11:06 +09:00
3a03833912 Merge pull request #16890 from peppy/beatmap-decoder-ruleset-store
Fix `LegacyBeatmapDecoder` not populating correct rulesets
2022-02-25 19:03:43 +09:00
d8fa443ea0 Extract default mod switch measurements to constants
For use later when specific sizes/scales of the mod switches are
desired.
2022-02-22 23:22:11 +01:00
bedd07d2e4 Add remark about usage of CalculateAll() 2022-02-22 18:12:55 +09:00
cfc41a0a36 Implement small mod switch 2022-02-22 00:26:35 +01:00
5186693dad Implement tiny mod switch 2022-02-22 00:26:35 +01:00
c466d6df94 Ensure to not multiply by 0 2022-02-21 17:19:35 +09:00
c3b365cf6b Scale classic score by hitobject count 2022-02-21 13:31:03 +09:00
567da9214e Merge branch 'master' into osu-diff-calc-max-combo 2022-02-18 18:35:24 +09:00
3945cd24eb wip 2022-02-17 21:14:49 +09:00
7307e68e9c Revert "Merge pull request #16889 from smoogipoo/remove-mod-multiplier"
This reverts commit 252b945d3b, reversing
changes made to a1b39a96cf.
2022-02-17 13:26:12 +09:00