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

16595 Commits

Author SHA1 Message Date
Dean Herbert
a6531bf73e Don't show distance snap grid for spinners (for now) 2020-02-07 19:09:23 +09:00
Dan Balasescu
71ba3e459b
Merge pull request #7750 from peppy/fix-editor-test-scene
Fix editor test scene exiting after loading
2020-02-07 18:07:48 +09:00
Dan Balasescu
7b70481a10
Merge branch 'master' into fix-editor-test-scene 2020-02-07 17:20:43 +09:00
Dan Balasescu
a6a285bc09
Merge branch 'master' into fix-editor-snapping-inaccuracy 2020-02-07 17:20:42 +09:00
Dan Balasescu
e6060d5ecc
Merge pull request #7749 from peppy/fix-incorrect-distance-snap-grip
Fix incorrect distance snap grid being displayed when in selection mode
2020-02-07 17:20:28 +09:00
Dan Balasescu
5d6e007929
Merge branch 'master' into overlapping-scroll-origin 2020-02-07 16:44:34 +09:00
Dan Balasescu
efa7eb70af
Merge branch 'master' into fix-incorrect-distance-snap-grip 2020-02-07 16:44:33 +09:00
Dean Herbert
8990152315 Fix duration snapping still being incorrect 2020-02-07 16:43:50 +09:00
Dean Herbert
9997ae17bc Fix editor test scene exiting after loading 2020-02-07 16:42:56 +09:00
Dean Herbert
3aa18abd99
Fix typo in xmldoc
Co-Authored-By: Tree <thewildtree@outlook.com>
2020-02-07 16:22:59 +09:00
Dean Herbert
f63bf06373 Fix incorrect distance snap grid being displayed when in selection mode 2020-02-07 16:09:54 +09:00
Dean Herbert
c392ba6a7e Update framework 2020-02-07 15:46:10 +09:00
Bartłomiej Dach
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
Andrei Zavatski
5946ad7d80 Fix possible memory leak and better user change test support 2020-02-06 16:54:02 +03:00
Andrei Zavatski
0840033343 Merge remote-tracking branch 'refs/remotes/ppy/master' into logged-out-comments 2020-02-06 16:38:47 +03:00
Dean Herbert
1613198834 Set a sane default keyboard step for mod settings 2020-02-06 19:43:33 +09:00
Dean Herbert
48350638a2 Hide drag handles of all playlist items not currently being dragged 2020-02-06 18:38:00 +09:00
Dean Herbert
0c30e802c0 Merge remote-tracking branch 'upstream/master' into rearrangeable-playlist 2020-02-06 17:40:28 +09:00
Dean Herbert
6b67b601e9 Update framework 2020-02-06 17:35:13 +09:00
Dan Balasescu
edf20e2c3e
Merge branch 'master' into lounge-ruleset-filtering 2020-02-06 15:35:26 +09:00
Dan Balasescu
8d12d820f1
Merge pull request #7734 from peppy/editor-slider-repeat
Add the ability to extend hold notes (spinners / sliders etc.) via timeline
2020-02-06 15:35:16 +09:00
Dan Balasescu
108de6ac56
Merge branch 'master' into editor-slider-repeat 2020-02-06 14:48:45 +09:00
smoogipoo
6ae0efa40d Fix adjustment not working when dragged before object 2020-02-06 14:47:43 +09:00
smoogipoo
c138e3907e Move methods below ctor 2020-02-06 14:35:45 +09:00
Dean Herbert
fd71a53717 Fix test regression 2020-02-06 14:28:09 +09:00
Dean Herbert
a84386ba01 Merge branch 'simplify-mp-subscreen-disables' into lounge-ruleset-filtering 2020-02-06 14:22:52 +09:00
Dean Herbert
81cadb7875 Simplify the way multiple subscreens handle their disable states via a custom stack 2020-02-06 14:22:01 +09:00
Dean Herbert
114fd967c1 Revert "Remove leasing at a Multiplayer screen level"
This reverts commit 304a071e39.
2020-02-06 13:47:34 +09:00
Dean Herbert
d00b61de99 Merge branch 'master' into lounge-ruleset-filtering 2020-02-06 13:38:27 +09:00
Dean Herbert
e548a4b8dd Fix missing bind causing regression in filter 2020-02-06 13:36:49 +09:00
Dean Herbert
94b6564b98 Merge branch 'master' into editor-slider-repeat 2020-02-06 13:16:39 +09:00
Dean Herbert
daf5fa9da4 Throw NotSupportedException instead 2020-02-06 13:16:32 +09:00
Dean Herbert
75eb9ca040
Merge pull request #7739 from peppy/fix-rooms-test-scene
Fix rooms test scene not displaying anything
2020-02-06 13:12:10 +09:00
Dean Herbert
061b8c389f Fix null search string causing an exception 2020-02-06 13:03:04 +09:00
Dean Herbert
1dc7fc4a33 Fix case where playlist is empty 2020-02-06 13:01:48 +09:00
Dan Balasescu
38bf14a06c
Merge branch 'master' into editor-beatmap-component 2020-02-06 12:25:33 +09:00
Dean Herbert
a79d6ff27a Change transition to better handle mass filter cases 2020-02-06 12:17:20 +09:00
Dean Herbert
304a071e39 Remove leasing at a Multiplayer screen level 2020-02-06 12:17:20 +09:00
Dean Herbert
50c4e34c92 Add ruleset to multiplayer filter criteria 2020-02-06 12:17:20 +09:00
Dean Herbert
00edc7e66f Fix RoomsContainer test scene not displaying 2020-02-06 12:14:17 +09:00
Dean Herbert
f5edad16e6 Improve visuals 2020-02-05 19:43:13 +09:00
Dean Herbert
98ab1f9862 Fix negative spinners 2020-02-05 18:35:31 +09:00
Dean Herbert
3d42973764 Allow scrolling via drag while dragging a hold note handle 2020-02-05 18:35:31 +09:00
Dean Herbert
cef45afbc8 Add a simple hover state 2020-02-05 18:35:31 +09:00
Dean Herbert
d56accaef1 Disallow negative / zero repeat counts (and fix off-by-one) 2020-02-05 18:35:31 +09:00
Dean Herbert
09273d1da9 Fix test scene not correctly building a playable beatmap 2020-02-05 18:35:31 +09:00
Dean Herbert
d04cc0123d Initial implementation of timeline blueprint dragbars 2020-02-05 18:35:31 +09:00
Dean Herbert
cd6902a312 Make EndTime and RepeatCount settable 2020-02-05 17:52:51 +09:00
Dean Herbert
96986bf5fc Remove beat divisor from ctor and use DI instead 2020-02-05 17:48:21 +09:00
Dean Herbert
63c595ed97 Make EditorBeatmap a component and move UpdateHitObject to it 2020-02-05 17:48:21 +09:00