Commit Graph

779 Commits

Author SHA1 Message Date
a6b153673e Fix icons not updating tooltip text correctly 2020-03-23 14:58:02 +09:00
4f9ac7b81e Merge branch 'master' into show-mod-settings-tooltip 2020-03-23 14:57:54 +09:00
d8041a0dcb Increase sample concurrency to better match stable 2020-03-22 02:16:28 +09:00
18bf7c913b show mod settings in ModIcon tooltip 2020-03-18 23:43:26 -04:00
6c28fd21c7 osu-side changes 2020-02-24 20:52:15 +09:00
5fde4f2c0c Fix lifetime calculation in overlapping algorithm
Changes to lifetime calculation in scrolling rulesets introduced in
#7367, which aimed to account for the distance between hit objects'
origin and its edge entering the scrolling area, fixed some issues with
hitobjects appearing abruptly, but also regressed some other scenarios.

Upon investigation, the regression was localised to the overlapping
scroll algorithm. The reason for this was two-fold:

* The previous code used TimeAt() to calculate the time of travel from
  the hit object's edge to its origin. For other algorithms, that time
  can be accurately reconstructed, because they don't have periods of
  time where there are multiple hit objects scrolling at different
  velocities.

  That invariant does not hold for the overlapping algorithm, therefore
  it is possible for different values to be technically correct for
  TimeAt(). However, the only value that matters for the adjustment
  is the one that's indicated by the control point that applies to the
  hit object origin, which can be uniquely identified.

* Additionally, the offset returned (even if correct) was applied
  externally to the hit object's start time and passed to
  GetDisplayStartTime(). In the overlapping algorithm, the choice of
  control point used in GetDisplayStartTime() is important, since
  the value of the speed multiplier is read within.

  Externally rewinding the hit object's start time meant that in some
  cases the speed multiplier of the *previous* control point is applied,
  which led to hit objects appearing too late if the scrolling rate
  decreased.

Because of the above, modify GetDisplayStartTime() to take the offset
into account in all algorithms, and apply the adjustment correctly
inside of them. The constant and sequential algorithms needed no
adjustment from the previous logic, since:

* the constant algorithm disregarded control points, and
* the sequential algorithm would effectively rewind to time = 0,
  calculate the absolute distance from time = 0 to the hit object start,
  apply the origin offset *to the absolute distance*, and then convert
  back to time, applying all control points in sequence. Due to this
  it was impossible for control points to get mixed up while
  calculating.

As for the overlapping algorithm, the high-level logic is as follows:

* The distance that the origin has to travel is the length of the scroll
  plus the distance from the origin to the object edge.
* The above distance divided by the scroll length gives the relative
  scroll lengths that the object has to travel.
* As one relative scroll length takes one time range, the relative
  travel length multiplied by the time range gives the absolute travel
  time of the object origin.
* Finally, the control point multiplier applicable at origin time is
  applied to the whole travel time.

Correctness of the above is demonstrated by visual tests added before
and headless unit tests of the algorithms themselves. The sequential
scroll algorithm was not covered by unit tests, and remains uncovered
due to floating-point inaccuracies that should be addressed separately.
2020-02-06 23:13:28 +01:00
7b2f58eb30 Apply OnRelease method signature refactorings 2020-01-22 13:22:34 +09:00
e096688ac8 simplify some stuff 2020-01-16 17:58:47 +08:00
970653470c format 2020-01-15 17:49:45 +08:00
5d160376c0 nullable-ize Mod.Icon 2020-01-14 21:22:00 +08:00
abdebcfddc switch to changing Mod property 2020-01-14 20:11:32 +08:00
c08fc62e00 expose setter of Mod 2020-01-14 19:59:43 +08:00
3621362a48 Merge branch 'master' into scrolling-container-origin-adjust 2019-12-27 16:52:21 +01:00
193e41f878 Add origin adjustment for hitobject lifetime
Visual inspection of taiko gameplay has shown that hitobjects appeared
on screen only when the origin of the hitobject came into the bounds
of the screen, instead of appearing when any visible part of the
hitobject came into the screen bounds.

This behaviour was due to lifetime calculation being based on the origin
of the hitobject and not taking into account the actual object
dimensions. Adjust the lifetime start of the hitobject by subtracting
the time needed to show the part of the hitobject that should already
be visible on screen when the origin comes into frame.
2019-12-26 20:37:29 +01:00
977fb3d1bf Make processors and break overlay frame-stable 2019-12-26 14:59:49 +09:00
a47e5aeead Fix sample lookup not working correctly for custom rulesets 2019-12-26 00:51:44 +09:00
5664ce3109 Add hitobject container regression test 2019-12-18 18:51:12 +09:00
df8f8ffd0d Fix potential exception during removal 2019-12-18 12:03:15 +09:00
bcc19e29f2 Fix editor crashing after re-ordering objects 2019-12-18 02:56:29 +09:00
e0ce87adca Move CreateScoreProcessor() to Ruleset (#7244)
Move CreateScoreProcessor() to Ruleset
2019-12-17 22:15:42 +09:00
49bf8d27d1 Move CreateScoreProcessor() to Ruleset 2019-12-17 20:08:13 +09:00
3c39fde7ff CA1065: throw NotSupportedException in properties. 2019-12-17 13:00:05 +08:00
5861eca80d Make DrawableRuleset take a converted beatmap 2019-12-12 15:58:11 +09:00
48f1dad4aa Remove abstract ScoreProcessor class 2019-12-11 17:25:06 +09:00
f7f4a57c5f Update bindable types in line with framework 2019-12-10 16:48:24 +09:00
f181ee1843 Hide the menu cursor while inside the playfield by default 2019-11-29 17:35:11 +09:00
c0fe91a84c Merge branch 'master' into sharpen 2019-11-26 18:21:50 +08:00
709ec1404f Centralise End/StartTime retrieval to extension method 2019-11-25 19:09:14 +09:00
6126fd9a6b ApplyToDrawableHitObjects should be able to get all the hitobject in nasted Playfield 2019-11-24 10:42:05 +09:00
eb2f7c1d0a Rename forgotten variable 2019-11-21 20:37:02 +03:00
0f1a3d97c8 Naming adjustments 2019-11-21 20:34:19 +03:00
c7c8527f5f Remove OnHighlightedChanged function 2019-11-21 20:22:15 +03:00
458496206c Merge remote-tracking branch 'refs/remotes/ppy/master' into beatmap-mod-selector 2019-11-21 18:49:37 +03:00
818553027b Merge branch 'master' into sharpen 2019-11-21 23:42:46 +08:00
a7c074ff37 Merge branch 'master' into math_clamp 2019-11-21 11:08:56 +09:00
5391c752b4 Implement IAggregateAudioAdjustments properties for FallbackSampleStore 2019-11-21 03:20:08 +03:00
6cab517b2d .NET Standard 2.1 implements Math.Clamp , use it instead of MathHelper.Clamp from osuTK. 2019-11-20 13:37:47 +01:00
374ef6ff83 Merge branch 'master' into sharpen 2019-11-20 17:30:58 +08:00
b1b234c6fb Use paramref. 2019-11-17 20:49:36 +08:00
f05b83d7d4 Use typeparamref. 2019-11-17 20:48:23 +08:00
e5e8e70704 Use pattern matching. 2019-11-12 19:55:19 +08:00
fa01e11a6e Merge remote-tracking branch 'refs/remotes/ppy/master' into beatmap-mod-selector 2019-11-12 08:25:42 +03:00
ccc8aa6fa4 Apply brace style. 2019-11-11 20:13:13 +08:00
e3d8e29cdd Merge remote-tracking branch 'refs/remotes/ppy/master' into beatmap-mod-selector 2019-11-10 23:38:41 +03:00
d089e47a56 Merge branch 'master' into master 2019-11-01 14:15:57 +09:00
0171b2ae7c Fix scrolling hitobjects expiring too soon 2019-11-01 12:10:03 +09:00
e35931fdfc removed blank line 2019-10-26 14:33:59 -05:00
9e2e87c8d1 added visual tests
added small commenting
added xmldoc for CancelResume();
2019-10-26 14:29:52 -05:00
f8354eefc4 Added null check in the CancelResume method 2019-10-25 16:49:18 -05:00
b0e21c2749 Fixed Issue #6442 2019-10-25 14:57:49 -05:00